fix(ui) - scroll error on destroy

This commit is contained in:
Shekar Siri 2021-09-09 12:53:51 +05:30
parent 440f104baa
commit b2e63dc98f

View file

@ -42,7 +42,9 @@ export default class EventsBlock extends React.PureComponent {
this.props.setEventFilter({ query: value, filter })
setTimeout(() => {
this.scroller.current.scrollToRow(0);
if (!this.scroller.current) return;
this.scroller.current.scrollToRow(0);
}, 100)
}
@ -54,7 +56,9 @@ export default class EventsBlock extends React.PureComponent {
this.scroller.current.forceUpdateGrid();
setTimeout(() => {
this.scroller.current.scrollToRow(0);
if (!this.scroller.current) return;
this.scroller.current.scrollToRow(0);
}, 100)
}