Skip to content

Commit

Permalink
fix(Button): pass focus options (#4399)
Browse files Browse the repository at this point in the history
  • Loading branch information
meltyshev authored Nov 22, 2022
1 parent c3cbcae commit be9c744
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/elements/Button/Button.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ declare class Button extends React.Component<ButtonProps> {
static Group: typeof ButtonGroup
static Or: typeof ButtonOr

focus: () => void
focus: (options?: FocusOptions) => void
}

export default Button
2 changes: 1 addition & 1 deletion src/elements/Button/Button.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ class Button extends Component {
if (ElementType === 'div') return 0
}

focus = () => _.invoke(this.ref.current, 'focus')
focus = (options) => _.invoke(this.ref.current, 'focus', options)

handleClick = (e) => {
const { disabled } = this.props
Expand Down

0 comments on commit be9c744

Please sign in to comment.