mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Time Picker: Fix "Fiscal year start month" selection behaviour (#98576)
don't close overlay when interacting with portal elements (e.g. dropdowns)
This commit is contained in:
parent
ea5b9fdc97
commit
87b250d7e2
@ -19,6 +19,7 @@ import { useStyles2 } from '../../themes/ThemeContext';
|
||||
import { t, Trans } from '../../utils/i18n';
|
||||
import { ButtonGroup } from '../Button';
|
||||
import { getModalStyles } from '../Modal/getModalStyles';
|
||||
import { getPortalContainer } from '../Portal/Portal';
|
||||
import { ToolbarButton } from '../ToolbarButton';
|
||||
import { Tooltip } from '../Tooltip/Tooltip';
|
||||
|
||||
@ -123,7 +124,8 @@ export function TimeRangePicker(props: TimeRangePickerProps) {
|
||||
isDismissable: true,
|
||||
isOpen,
|
||||
shouldCloseOnInteractOutside: (element) => {
|
||||
return !buttonRef.current?.contains(element);
|
||||
const portalContainer = getPortalContainer();
|
||||
return !buttonRef.current?.contains(element) && !portalContainer.contains(element);
|
||||
},
|
||||
},
|
||||
overlayRef
|
||||
|
Loading…
Reference in New Issue
Block a user