Focus on card title when opening cards
This commit is contained in:
parent
0b3fa571a7
commit
951aba1a4d
1 changed files with 5 additions and 1 deletions
|
@ -39,10 +39,14 @@ type State = {
|
|||
class CardDetail extends React.Component<Props, State> {
|
||||
private titleRef = React.createRef<Editable>()
|
||||
|
||||
shouldComponentUpdate() {
|
||||
shouldComponentUpdate(): boolean {
|
||||
return true
|
||||
}
|
||||
|
||||
componentDidMount(): void {
|
||||
this.titleRef.current?.focus()
|
||||
}
|
||||
|
||||
constructor(props: Props) {
|
||||
super(props)
|
||||
this.state = {
|
||||
|
|
Loading…
Reference in a new issue