File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
src/components/RelativeRangeDatePicker/components/PickerDialog Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -26,7 +26,8 @@ export interface PickerDialogProps {
26
26
isMobile ?: boolean ;
27
27
anchorRef ?: React . RefObject < HTMLElement > ;
28
28
onClose : ( ) => void ;
29
- focusInput : ( ) => void ;
29
+ focusInput ?: ( ) => void ;
30
+ disableFocusTrap ?: boolean ;
30
31
}
31
32
32
33
export function PickerDialog ( {
@@ -38,6 +39,7 @@ export function PickerDialog({
38
39
isMobile,
39
40
anchorRef,
40
41
className,
42
+ disableFocusTrap,
41
43
} : PickerDialogProps ) {
42
44
if ( isMobile ) {
43
45
return (
@@ -56,14 +58,14 @@ export function PickerDialog({
56
58
open = { open }
57
59
onEscapeKeyDown = { ( ) => {
58
60
onClose ( ) ;
59
- focusInput ( ) ;
61
+ focusInput ?. ( ) ;
60
62
} }
61
63
onClose = { onClose }
62
64
role = "dialog"
63
65
anchorRef = { anchorRef }
64
66
contentClassName = { b ( 'content' , { size : props . size } , className ) }
65
- autoFocus
66
- focusTrap
67
+ autoFocus = { ! disableFocusTrap }
68
+ focusTrap = { ! disableFocusTrap }
67
69
>
68
70
< DialogContent { ...props } state = { state } onApply = { onClose } />
69
71
</ Popup >
You can’t perform that action at this time.
0 commit comments