Web: Common: PageLayout: Fixed error "Cannot read properties of null (reading 'focus')".
This commit is contained in:
parent
ac0e803072
commit
fce60f4018
@ -106,8 +106,9 @@ class SectionBody extends React.Component {
|
||||
// }
|
||||
|
||||
componentDidMount() {
|
||||
const { withScroll } = this.props;
|
||||
if (!this.props.autoFocus) return;
|
||||
this.focusRef.current.focus();
|
||||
if (withScroll) this.focusRef.current.focus();
|
||||
}
|
||||
|
||||
componentWillUnmount() {
|
||||
|
Loading…
Reference in New Issue
Block a user