mirror of
https://github.com/nextui-org/nextui.git
synced 2025-12-08 19:26:11 +00:00
fix(popover): isDismissable prop passed to aria popover hook (#2032)
This commit is contained in:
parent
436ba1cd84
commit
01aedcf09b
5
.changeset/wise-snails-sing.md
Normal file
5
.changeset/wise-snails-sing.md
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
"@nextui-org/popover": patch
|
||||
---
|
||||
|
||||
Fix #2025 isDismissable prop passed to the aria-popover hook.
|
||||
@ -47,6 +47,7 @@ export function useReactAriaPopover(
|
||||
scrollRef,
|
||||
shouldFlip,
|
||||
boundaryElement,
|
||||
isDismissable = true,
|
||||
shouldCloseOnBlur = true,
|
||||
placement: placementProp = "top",
|
||||
containerPadding,
|
||||
@ -63,7 +64,7 @@ export function useReactAriaPopover(
|
||||
isOpen: state.isOpen,
|
||||
onClose: state.close,
|
||||
shouldCloseOnBlur,
|
||||
isDismissable: true,
|
||||
isDismissable,
|
||||
isKeyboardDismissDisabled,
|
||||
shouldCloseOnInteractOutside: shouldCloseOnInteractOutside
|
||||
? shouldCloseOnInteractOutside
|
||||
|
||||
@ -91,6 +91,7 @@ export function usePopover(originalProps: UsePopoverProps) {
|
||||
shouldFlip = true,
|
||||
containerPadding = 12,
|
||||
shouldBlockScroll = false,
|
||||
isDismissable = true,
|
||||
shouldCloseOnBlur,
|
||||
portalContainer,
|
||||
placement: placementProp = "top",
|
||||
@ -144,6 +145,7 @@ export function usePopover(originalProps: UsePopoverProps) {
|
||||
placement: placementProp,
|
||||
offset: offset,
|
||||
scrollRef,
|
||||
isDismissable,
|
||||
shouldCloseOnBlur,
|
||||
boundaryElement,
|
||||
crossOffset,
|
||||
|
||||
@ -454,6 +454,16 @@ export const DisableAnimation = {
|
||||
},
|
||||
};
|
||||
|
||||
export const NonDismissable = {
|
||||
render: Template,
|
||||
|
||||
args: {
|
||||
...defaultProps,
|
||||
showArrow: true,
|
||||
isDismissable: false,
|
||||
},
|
||||
};
|
||||
|
||||
export const WithoutScaleTrigger = {
|
||||
render: Template,
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user