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 {
2626 isMobile ?: boolean ;
2727 anchorRef ?: React . RefObject < HTMLElement > ;
2828 onClose : ( ) => void ;
29- focusInput : ( ) => void ;
29+ focusInput ?: ( ) => void ;
30+ disableFocusTrap ?: boolean ;
3031}
3132
3233export function PickerDialog ( {
@@ -38,6 +39,7 @@ export function PickerDialog({
3839 isMobile,
3940 anchorRef,
4041 className,
42+ disableFocusTrap,
4143} : PickerDialogProps ) {
4244 if ( isMobile ) {
4345 return (
@@ -56,14 +58,14 @@ export function PickerDialog({
5658 open = { open }
5759 onEscapeKeyDown = { ( ) => {
5860 onClose ( ) ;
59- focusInput ( ) ;
61+ focusInput ?. ( ) ;
6062 } }
6163 onClose = { onClose }
6264 role = "dialog"
6365 anchorRef = { anchorRef }
6466 contentClassName = { b ( 'content' , { size : props . size } , className ) }
65- autoFocus
66- focusTrap
67+ autoFocus = { ! disableFocusTrap }
68+ focusTrap = { ! disableFocusTrap }
6769 >
6870 < DialogContent { ...props } state = { state } onApply = { onClose } />
6971 </ Popup >
You can’t perform that action at this time.
0 commit comments