Skip to content

Commit

Permalink
fix(menu): add onMouseDown prop to OptionListProps (uber#4589)
Browse files Browse the repository at this point in the history
Add onMouseDown prop to OptionListProps, as this is present in dropdown.js:
https://github.com/uber/baseweb/blob/master/src/select/dropdown.js#L188
  • Loading branch information
leyanlo authored Oct 25, 2021
1 parent a4410c9 commit 293aa5b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/menu/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ export interface OptionListProps extends BaseMenuPropsT {
item: any;
getItemLabel: (item: any) => React.ReactNode;
getChildMenu?: (item: any) => React.ReactNode;
onMouseDown?: (event: MouseEvent) => any;
onMouseEnter?: (event: MouseEvent) => any;
size?: OPTION_LIST_SIZE[keyof OPTION_LIST_SIZE];
overrides?: {
Expand Down
2 changes: 2 additions & 0 deletions src/menu/types.js
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,8 @@ export type OptionListPropsT = {
getChildMenu?: (item: ItemT) => React.Node,
onClick?: (event: MouseEvent) => mixed,
/** Callback used to change highlighted index in stateful menu. */
onMouseDown?: (event: MouseEvent) => mixed,
/** Callback used to change highlighted index in stateful menu. */
onMouseEnter?: (event: MouseEvent) => mixed,
/** Renders UI in defined scale. */
size?: $Keys<typeof OPTION_LIST_SIZE>,
Expand Down

0 comments on commit 293aa5b

Please sign in to comment.