Skip to content

Commit

Permalink
Fix command menu action click (#9285)
Browse files Browse the repository at this point in the history
- Fix typing
- Fix onClick
  • Loading branch information
bosiraphael authored Dec 30, 2024
1 parent e1c99be commit 7388f2b
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { useCommandMenu } from '@/command-menu/hooks/useCommandMenu';
import { useCommandMenuHotKeys } from '@/command-menu/hooks/useCommandMenuHotKeys';
import { useMatchingCommandMenuCommands } from '@/command-menu/hooks/useMatchingCommandMenuCommands';
import { commandMenuSearchState } from '@/command-menu/states/commandMenuSearchState';
import { Command } from '@/command-menu/types/Command';
import { SelectableItem } from '@/ui/layout/selectable-list/components/SelectableItem';
import { SelectableList } from '@/ui/layout/selectable-list/components/SelectableList';
import { AppHotkeyScope } from '@/ui/utilities/hotkey/types/AppHotkeyScope';
Expand All @@ -23,7 +24,7 @@ const MOBILE_NAVIGATION_BAR_HEIGHT = 64;

type CommandGroupConfig = {
heading: string;
items?: any[];
items?: Command[];
};

const StyledCommandMenu = styled.div`
Expand Down Expand Up @@ -233,7 +234,7 @@ export const CommandMenu = () => {
Icon={item.Icon}
label={item.label}
to={item.to}
onClick={item.onClick}
onClick={item.onCommandClick}
firstHotKey={item.firstHotKey}
secondHotKey={item.secondHotKey}
shouldCloseCommandMenuOnClick={
Expand Down

0 comments on commit 7388f2b

Please sign in to comment.