1880 Refactored Dropdown components (#1884)
* updated DropdownButton props * refactoring in progress * working but layout is wrong * fixed bug * wip on ColumnHeadWithDropdown * fix bug * fix bug * remove unused styled component * fix z-index bug * add an optional argument to DropdownMenu to control the offset of the menu * add an optional argument to DropdownMenu to control the offset of the menu * modify files after PR comments * clean the way the offset is handled * fix lint
This commit is contained in:
@ -9,7 +9,7 @@ import { DropdownMenuInputContainer } from '@/ui/dropdown/components/DropdownMen
|
||||
import { StyledDropdownMenu } from '@/ui/dropdown/components/StyledDropdownMenu';
|
||||
import { StyledDropdownMenuItemsContainer } from '@/ui/dropdown/components/StyledDropdownMenuItemsContainer';
|
||||
import { StyledDropdownMenuSeparator } from '@/ui/dropdown/components/StyledDropdownMenuSeparator';
|
||||
import { useDropdownButton } from '@/ui/dropdown/hooks/useDropdownButton';
|
||||
import { useDropdown } from '@/ui/dropdown/hooks/useDropdown';
|
||||
import { IconChevronLeft, IconFileImport, IconTag } from '@/ui/icon';
|
||||
import { MenuItem } from '@/ui/menu-item/components/MenuItem';
|
||||
import { useScopedHotkeys } from '@/ui/utilities/hotkey/hooks/useScopedHotkeys';
|
||||
@ -37,7 +37,7 @@ export const TableOptionsDropdownContent = () => {
|
||||
const scopeId = useRecoilScopeId(TableRecoilScopeContext);
|
||||
|
||||
const { onImport } = useContext(ViewBarContext);
|
||||
const { closeDropdownButton } = useDropdownButton({
|
||||
const { closeDropdown } = useDropdown({
|
||||
dropdownId: TableOptionsDropdownId,
|
||||
});
|
||||
|
||||
@ -114,7 +114,7 @@ export const TableOptionsDropdownContent = () => {
|
||||
Key.Escape,
|
||||
() => {
|
||||
resetViewEditMode();
|
||||
closeDropdownButton();
|
||||
closeDropdown();
|
||||
},
|
||||
TableOptionsHotkeyScope.Dropdown,
|
||||
);
|
||||
@ -125,7 +125,7 @@ export const TableOptionsDropdownContent = () => {
|
||||
handleViewNameSubmit();
|
||||
resetMenu();
|
||||
resetViewEditMode();
|
||||
closeDropdownButton();
|
||||
closeDropdown();
|
||||
},
|
||||
TableOptionsHotkeyScope.Dropdown,
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user