Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
constructor(props: Props) {
super(props)
this.logMeasureCache = new CellMeasurerCache({
defaultHeight: props.theme.log.minHeight,
fixedWidth: true,
minHeight: props.theme.log.minHeight,
})
}
function Browse() {
const { socketStore } = useRootStore()
const vList = React.useRef(null)
const measureCache = new CellMeasurerCache({
fixedWidth: true,
minHeight: 43
})
function handleMessagesChanged(len: number) {
if (len === 0) {
return measureCache.clearAll()
}
if (vList.current) {
vList.current.scrollToRow(len - 1)
}
}
function listenMessagesLen() {
return reaction(() => socketStore.messages.length, handleMessagesChanged)
}
constructor(props: Props) {
super(props)
this.commandMeasureCache = new CellMeasurerCache({
defaultHeight: props.theme.log.minHeight,
fixedWidth: true,
keyMapper: (index) => this.getRowsToRender()[index],
minHeight: props.theme.log.minHeight,
})
}
constructor(props: Props) {
super(props)
this.logMeasureCache = new CellMeasurerCache({
defaultHeight: props.theme.log.minHeight,
fixedWidth: true,
keyMapper: (index) => _.get(this.props.allLogs.logs[index], 'id'),
minHeight: props.theme.log.minHeight,
})
}
constructor(props: Props) {
super(props)
this.logMeasureCache = new CellMeasurerCache({
defaultHeight: props.theme.log.minHeight,
fixedWidth: true,
keyMapper: (index) => _.get(this.props.logs[index], 'id'),
minHeight: props.theme.log.minHeight,
})
}