Set collapse in a totally different function instead

patch-2
Sean King 2020-10-09 15:27:07 -06:00
rodzic 8e44e72d8e
commit dcc21221a5
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 510C52BACD6E7257
1 zmienionych plików z 14 dodań i 0 usunięć

Wyświetl plik

@ -58,6 +58,14 @@ export default class StatusContent extends React.PureComponent {
link.setAttribute('title', link.href); link.setAttribute('title', link.href);
} }
} }
}
setCollapse() {
const node = this.node;
if (!node) {
return;
}
if ( if (
this.props.collapsable this.props.collapsable
@ -70,7 +78,13 @@ export default class StatusContent extends React.PureComponent {
} }
} }
componentDidMount() {
this.setCollapse();
this._updateStatusLinks();
}
componentDidUpdate() { componentDidUpdate() {
this.setCollapse();
this._updateStatusLinks(); this._updateStatusLinks();
} }