Focus on card title when opening cards

This commit is contained in:
Chen-I Lim 2020-11-12 14:06:19 -08:00
parent 0b3fa571a7
commit 951aba1a4d

View file

@ -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 = {