Fixed date input fields (#9442)
- Fixed date input fields : proper hotkey management, like other fields - Removed DropdownUnmountEffect which was causing many bugs.
This commit is contained in:
@ -15,7 +15,6 @@ import { Keys } from 'react-hotkeys-hook';
|
||||
import { useDropdown } from '../hooks/useDropdown';
|
||||
|
||||
import { DropdownContent } from '@/ui/layout/dropdown/components/DropdownContent';
|
||||
import { DropdownUnmountEffect } from '@/ui/layout/dropdown/components/DropdownUnmountEffect';
|
||||
import { DropdownComponentInstanceContext } from '@/ui/layout/dropdown/contexts/DropdownComponeInstanceContext';
|
||||
import { dropdownHotkeyComponentState } from '@/ui/layout/dropdown/states/dropdownHotkeyComponentState';
|
||||
import { dropdownMaxHeightComponentStateV2 } from '@/ui/layout/dropdown/states/dropdownMaxHeightComponentStateV2';
|
||||
@ -165,7 +164,6 @@ export const Dropdown = ({
|
||||
/>
|
||||
</>
|
||||
</DropdownScope>
|
||||
<DropdownUnmountEffect dropdownId={dropdownId} />
|
||||
</DropdownComponentInstanceContext.Provider>
|
||||
);
|
||||
};
|
||||
|
||||
@ -1,18 +0,0 @@
|
||||
import { useDropdownV2 } from '@/ui/layout/dropdown/hooks/useDropdownV2';
|
||||
import { useEffect } from 'react';
|
||||
|
||||
export const DropdownUnmountEffect = ({
|
||||
dropdownId,
|
||||
}: {
|
||||
dropdownId: string;
|
||||
}) => {
|
||||
const { closeDropdown } = useDropdownV2();
|
||||
|
||||
useEffect(() => {
|
||||
return () => {
|
||||
closeDropdown(dropdownId);
|
||||
};
|
||||
}, [closeDropdown, dropdownId]);
|
||||
|
||||
return null;
|
||||
};
|
||||
Reference in New Issue
Block a user