Skip to content

Commit

Permalink
[Menu] Add missing autoFocus TypeScript types (#16289)
Browse files Browse the repository at this point in the history
* Add missing `autoFocus` property to `MenuProps`

* sort asc

* Add remaining autoFocus typings
  • Loading branch information
BassT authored and eps1lon committed Jun 19, 2019
1 parent e8a4842 commit 5ce2141
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/material-ui/src/ListItem/ListItem.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { OverridableComponent, OverrideProps } from '../OverridableComponent';
export interface ListItemTypeMap<P, D extends React.ElementType> {
props: P & {
alignItems?: 'flex-start' | 'center';
autoFocus?: boolean;
button?: boolean;
ContainerComponent?: React.ElementType<React.HTMLAttributes<HTMLDivElement>>;
ContainerProps?: React.HTMLAttributes<HTMLDivElement>;
Expand Down
1 change: 1 addition & 0 deletions packages/material-ui/src/Menu/Menu.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { TransitionHandlerProps, TransitionProps } from '../transitions/transiti

export interface MenuProps
extends StandardProps<PopoverProps & Partial<TransitionHandlerProps>, MenuClassKey> {
autoFocus?: boolean;
disableAutoFocusItem?: boolean;
MenuListProps?: Partial<MenuListProps>;
PaperProps?: Partial<PaperProps>;
Expand Down
1 change: 1 addition & 0 deletions packages/material-ui/src/MenuList/MenuList.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { StandardProps } from '..';
import { ListProps, ListClassKey } from '../List';

export interface MenuListProps extends StandardProps<ListProps, MenuListClassKey, 'onKeyDown'> {
autoFocus?: boolean;
disableListWrap?: boolean;
onKeyDown?: React.ReactEventHandler<React.KeyboardEvent<any>>;
}
Expand Down

0 comments on commit 5ce2141

Please sign in to comment.