From ddedcf71722d10aae92e61d2864a1daee56e8d3c Mon Sep 17 00:00:00 2001 From: Shekar Siri Date: Fri, 13 Aug 2021 22:51:14 +0530 Subject: [PATCH] fix(ui) - sessions events overlapping on filter --- .../Session_/EventsBlock/EventGroupWrapper.js | 2 +- .../Session_/EventsBlock/EventsBlock.js | 15 +++++++-------- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/frontend/app/components/Session_/EventsBlock/EventGroupWrapper.js b/frontend/app/components/Session_/EventsBlock/EventGroupWrapper.js index 2950a728e..d065b4d7f 100644 --- a/frontend/app/components/Session_/EventsBlock/EventGroupWrapper.js +++ b/frontend/app/components/Session_/EventsBlock/EventGroupWrapper.js @@ -17,7 +17,7 @@ class EventGroupWrapper extends React.PureComponent { } componentDidUpdate(prevProps) { - if (prevProps.showLoadInfo !== this.props.showLoadInfo) { + if (prevProps.showLoadInfo !== this.props.showLoadInfo || prevProps.query !== this.props.query) { this.props.mesureHeight(); } } diff --git a/frontend/app/components/Session_/EventsBlock/EventsBlock.js b/frontend/app/components/Session_/EventsBlock/EventsBlock.js index 807607a55..53a83aaa9 100644 --- a/frontend/app/components/Session_/EventsBlock/EventsBlock.js +++ b/frontend/app/components/Session_/EventsBlock/EventsBlock.js @@ -39,14 +39,11 @@ export default class EventsBlock extends React.PureComponent { write = ({ target: { value, name } }) => { const { filter } = this.state; this.setState({ query: value }) - this.props.setEventFilter({ query: value, filter }) + this.props.setEventFilter({ query: value, filter }) setTimeout(() => { - this.scroller.current.scrollToRow(0); - this.scroller.current.recomputeGridSize(); - this.scroller.current.recomputeRowHeights(); - this.scroller.current.forceUpdateGrid(); - }, 200) + this.scroller.current.scrollToRow(0); + }, 100) } clearSearch = () => { @@ -131,7 +128,8 @@ export default class EventsBlock extends React.PureComponent { playing, eventsIndex, filteredEvents - } = this.props; + } = this.props; + const { query } = this.state; const _events = filteredEvents || events; const isLastEvent = index === _events.size - 1; const isLastInGroup = isLastEvent || _events.get(index + 1).type === TYPES.LOCATION; @@ -148,7 +146,8 @@ export default class EventsBlock extends React.PureComponent { > {({measure, registerChild}) => (
-