Skip to content

Commit

Permalink
add missing 'suppressRefError' option typings
Browse files Browse the repository at this point in the history
  • Loading branch information
rifler committed Aug 20, 2018
1 parent 8da833f commit e8eebe6
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 2 deletions.
10 changes: 10 additions & 0 deletions .all-contributorsrc
Original file line number Diff line number Diff line change
Expand Up @@ -926,6 +926,16 @@
"contributions": [
"example"
]
},
{
"login": "rifler",
"name": "Dmitrii Kanatnikov",
"avatar_url": "https://avatars3.githubusercontent.com/u/871583",
"profile": "https://github.com/rifler",
"contributions": [
"code",
"doc"
]
}
]
}
14 changes: 12 additions & 2 deletions typings/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ export interface DownshiftProps<Item> {
options: StateChangeOptions<Item>,
stateAndHelpers: ControllerStateAndHelpers<Item>,
) => void
suppressRefError?: boolean
}

export interface Environment {
Expand Down Expand Up @@ -105,6 +106,11 @@ export interface GetInputPropsOptions
export interface GetLabelPropsOptions
extends React.HTMLProps<HTMLLabelElement> {}

export interface GetMenuPropsOptions {
refKey?: string
'aria-label'?: string
}

export interface getToggleButtonPropsOptions
extends React.HTMLProps<HTMLButtonElement> {}

Expand All @@ -118,11 +124,15 @@ export interface GetItemPropsOptions<Item>
item: Item
}

export interface SuppressRefErrorOptions {
suppressRefError?: boolean
}

export interface PropGetters<Item> {
getRootProps: (options: GetRootPropsOptions) => any
getRootProps: (options: GetRootPropsOptions, suppressOptions?: SuppressRefErrorOptions) => any
getToggleButtonProps: (options?: getToggleButtonPropsOptions) => any
getLabelProps: (options?: GetLabelPropsOptions) => any
getMenuProps: (options?: {}) => any
getMenuProps: (options?: GetMenuPropsOptions, suppressOptions?: SuppressRefErrorOptions) => any
getInputProps: (options?: GetInputPropsOptions) => any
getItemProps: (options: GetItemPropsOptions<Item>) => any
}
Expand Down

0 comments on commit e8eebe6

Please sign in to comment.