From f737c2af864cc711ccfe7578cd2306e39382461b Mon Sep 17 00:00:00 2001 From: sawka Date: Sun, 7 Jan 2024 00:30:25 -0800 Subject: [PATCH] add autofocus prop to button --- src/app/common/common.tsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/app/common/common.tsx b/src/app/common/common.tsx index 0f263a8a..3e271b57 100644 --- a/src/app/common/common.tsx +++ b/src/app/common/common.tsx @@ -231,6 +231,7 @@ interface ButtonProps { rightIcon?: React.ReactNode; color?: string; style?: React.CSSProperties; + autoFocus?: boolean; } class Button extends React.Component { @@ -257,6 +258,7 @@ class Button extends React.Component { onClick={this.handleClick} disabled={disabled} style={style} + autoFocus={this.props.autoFocus} > {leftIcon && {leftIcon}} {children}