Skip to content

Commit

Permalink
fix(menu): fix typing of navigateMenu event
Browse files Browse the repository at this point in the history
  • Loading branch information
vicgeralds committed Mar 14, 2024
1 parent 1658310 commit fa3906f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion etc/lime-elements.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -1347,7 +1347,7 @@ namespace JSX_2 {
"gridLayout"?: boolean;
"items"?: Array<MenuItem | ListSeparator>;
"onCancel"?: (event: LimelMenuCustomEvent<void>) => void;
"onNavigateMenu"?: (event: LimelMenuCustomEvent<MenuItem>) => void;
"onNavigateMenu"?: (event: LimelMenuCustomEvent<MenuItem | null>) => void;
"onSelect"?: (event: LimelMenuCustomEvent<MenuItem>) => void;
"open"?: boolean;
"openDirection"?: OpenDirection;
Expand Down
4 changes: 2 additions & 2 deletions src/components/menu/menu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ export class Menu {
* Is emitted when a menu item with a sub-menu is selected.
*/
@Event()
public navigateMenu: EventEmitter<MenuItem>;
public navigateMenu: EventEmitter<MenuItem | null>;

@Element()
private host: HTMLLimelMenuElement;
Expand All @@ -184,7 +184,7 @@ export class Menu {
private searchValue: string;

@State()
private searchResults: Array<MenuItem | ListSeparator>;
private searchResults: Array<MenuItem | ListSeparator> | null;

private list: HTMLLimelMenuListElement;
private searchInput: HTMLLimelInputFieldElement;
Expand Down

0 comments on commit fa3906f

Please sign in to comment.