mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
TraceView: Fix broken rendering when scrolling in Dashboard panel in Firefox (#56642)
This commit is contained in:
parent
276b54fe9d
commit
a2f1d2e102
@ -215,10 +215,20 @@ export default class ListView extends React.Component<TListViewProps> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
componentDidUpdate() {
|
componentDidUpdate(prevProps: TListViewProps) {
|
||||||
if (this._itemHolderElm) {
|
if (this._itemHolderElm) {
|
||||||
this._scanItemHeights();
|
this._scanItemHeights();
|
||||||
}
|
}
|
||||||
|
// When windowScroller is set to false, we can continue to handle scrollElement
|
||||||
|
if (this.props.windowScroller) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
// check if the scrollElement changes and update its scroll listener
|
||||||
|
if (prevProps.scrollElement !== this.props.scrollElement) {
|
||||||
|
prevProps.scrollElement?.removeEventListener('scroll', this._onScroll);
|
||||||
|
this._wrapperElm = this.props.scrollElement;
|
||||||
|
this._wrapperElm?.addEventListener('scroll', this._onScroll);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
componentWillUnmount() {
|
componentWillUnmount() {
|
||||||
|
Loading…
Reference in New Issue
Block a user