How to use the react-virtualized/dist/es/CellMeasurer.CellMeasurerCache function in react-virtualized

To help you get started, we’ve selected a few react-virtualized examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github HiDeoo / YaTA / src / components / History.tsx View on Github external
constructor(props: Props) {
    super(props)

    this.logMeasureCache = new CellMeasurerCache({
      defaultHeight: props.theme.log.minHeight,
      fixedWidth: true,
      minHeight: props.theme.log.minHeight,
    })
  }
github YDJ-FE / ts-react-webpack / src / containers / views / SocketDebugger / Browse / index.tsx View on Github external
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)
    }
github HiDeoo / YaTA / src / components / CommandsHelp.tsx View on Github external
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,
    })
  }
github HiDeoo / YaTA / src / containers / Search.tsx View on Github external
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,
    })
  }
github HiDeoo / YaTA / src / components / Logs.tsx View on Github external
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,
    })
  }