diff --git a/pkg/interface/src/views/components/VirtualScroller.tsx b/pkg/interface/src/views/components/VirtualScroller.tsx index 3fbfd37c04..48278c5c21 100644 --- a/pkg/interface/src/views/components/VirtualScroller.tsx +++ b/pkg/interface/src/views/components/VirtualScroller.tsx @@ -101,7 +101,9 @@ interface VirtualScrollerState { } type LogLevel = 'scroll' | 'network' | 'bail' | 'reflow'; -const logLevel = ['network', 'bail', 'scroll', 'reflow'] as LogLevel[]; +const logLevel = process.env.NODE_ENV === 'production' + ? [] + : ['network', 'bail', 'scroll', 'reflow'] as LogLevel[]; const log = (level: LogLevel, message: string) => { if(logLevel.includes(level)) { @@ -485,6 +487,7 @@ export default class VirtualScroller extends Component extends Component { - const el = this.childRefs.get(index.toString()); + const el = this.childRefs.get(keyToString(index)); if(!el) { return; } @@ -517,7 +521,7 @@ export default class VirtualScroller extends Component extends Component {children.map(index => ( - key={index.toString()} + key={keyToString(index)} setRef={this.setRef} index={index} scrollWindow={this.window}