Skip to content
This repository was archived by the owner on Sep 20, 2024. It is now read-only.

fix: alert dialog leastDestructiveRef prop type #547

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/chakra-ui-core/src/CAlertDialog/CAlertDialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ const CAlertDialog = {
type: Function,
default: () => null
},
leastDestructiveRef: [HTMLElement, Object]
leastDestructiveRef: [HTMLElement, Object, String, Function]
},
render (h, { slots, props, data }) {
return h(CModal, {
Expand Down
2 changes: 1 addition & 1 deletion website/pages/alertdialog.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -120,4 +120,4 @@ exception is that it requires a `leastDestructiveRef` which is similar to the

| Name | Type | Default | Description |
| ------------------------------ | --------------------------------- | ------- | ------------------------------------------------------------- |
| leastDestructiveRef (required) | `ref`, `selector` `Function: ref` | | The least destructive action to get focus when dialog is open |
| leastDestructiveRef (required) | `vm.$ref`, `() => vm.ref` or `CSS selector` | | The least destructive action to get focus when dialog is open |