From be9c7440c306a0423761fbb77ac6b443646816e7 Mon Sep 17 00:00:00 2001 From: Maksim Eltyshev Date: Tue, 22 Nov 2022 16:19:29 +0500 Subject: [PATCH] fix(Button): pass focus options (#4399) --- src/elements/Button/Button.d.ts | 2 +- src/elements/Button/Button.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/elements/Button/Button.d.ts b/src/elements/Button/Button.d.ts index 91821fd363..9ccfd51701 100644 --- a/src/elements/Button/Button.d.ts +++ b/src/elements/Button/Button.d.ts @@ -123,7 +123,7 @@ declare class Button extends React.Component { static Group: typeof ButtonGroup static Or: typeof ButtonOr - focus: () => void + focus: (options?: FocusOptions) => void } export default Button diff --git a/src/elements/Button/Button.js b/src/elements/Button/Button.js index c4eba62d18..7518f559f0 100644 --- a/src/elements/Button/Button.js +++ b/src/elements/Button/Button.js @@ -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