Skip to content

Commit be9c744

Browse files
authored
fix(Button): pass focus options (#4399)
1 parent c3cbcae commit be9c744

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/elements/Button/Button.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ declare class Button extends React.Component<ButtonProps> {
123123
static Group: typeof ButtonGroup
124124
static Or: typeof ButtonOr
125125

126-
focus: () => void
126+
focus: (options?: FocusOptions) => void
127127
}
128128

129129
export default Button

src/elements/Button/Button.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ class Button extends Component {
5151
if (ElementType === 'div') return 0
5252
}
5353

54-
focus = () => _.invoke(this.ref.current, 'focus')
54+
focus = (options) => _.invoke(this.ref.current, 'focus', options)
5555

5656
handleClick = (e) => {
5757
const { disabled } = this.props

0 commit comments

Comments
 (0)