Auto-focus on card title only if its empty
This commit is contained in:
parent
0d2311fdc5
commit
2b186e2362
1 changed files with 3 additions and 1 deletions
|
@ -44,7 +44,9 @@ class CardDetail extends React.Component<Props, State> {
|
|||
}
|
||||
|
||||
componentDidMount(): void {
|
||||
this.titleRef.current?.focus()
|
||||
if (!this.state.title) {
|
||||
this.titleRef.current?.focus()
|
||||
}
|
||||
}
|
||||
|
||||
constructor(props: Props) {
|
||||
|
|
Loading…
Reference in a new issue