Loading apps/demo/src/components/grid.tsx +13 −10 Original line number Diff line number Diff line Loading @@ -182,7 +182,7 @@ export const Grid = withDisplayName('Grid')(({ }, [bodyRef]); const rowRange = useMemo(() => { const start = Math.floor(scrollTop / rowHeight); const start = Math.min(rowCount, Math.floor(scrollTop / rowHeight)); const end = Math.min(rowCount, Math.ceil((scrollTop + bodySize.height) / rowHeight)); return { start, end, offset: scrollTop - start * rowHeight }; }, [scrollTop, bodySize.height, rowCount, rowHeight]); Loading Loading @@ -302,7 +302,9 @@ export const Grid = withDisplayName('Grid')(({ <div ref={setBodyRef} className={classes.body} onScroll={handleScroll}> <ResizeObserver onResize={setBodySize} /> {placeholder} {Array.from(Array(rowRange.end - rowRange.start), (_, rowIndex) => ( {Array.from( { length: rowRange.end - rowRange.start }, (_, rowIndex) => ( <GridRowWrapper key={rowRange.start + rowIndex} RowComponent={RowComponent} Loading @@ -310,7 +312,8 @@ export const Grid = withDisplayName('Grid')(({ rowHeight={rowHeight} columns={columnMetadata.columns} /> ))} ) )} </div> </div> ); Loading apps/demo/src/pages/packet-log.tsx +1 −1 Original line number Diff line number Diff line Loading @@ -160,7 +160,7 @@ const columns: Column[] = [ const item = globalState.logs[rowIndex]; if (!item.arg1String) { item.arg1String = item.arg0.toString(16).padStart(8, '0'); item.arg1String = item.arg1.toString(16).padStart(8, '0'); } const classes = useClasses(); Loading Loading
apps/demo/src/components/grid.tsx +13 −10 Original line number Diff line number Diff line Loading @@ -182,7 +182,7 @@ export const Grid = withDisplayName('Grid')(({ }, [bodyRef]); const rowRange = useMemo(() => { const start = Math.floor(scrollTop / rowHeight); const start = Math.min(rowCount, Math.floor(scrollTop / rowHeight)); const end = Math.min(rowCount, Math.ceil((scrollTop + bodySize.height) / rowHeight)); return { start, end, offset: scrollTop - start * rowHeight }; }, [scrollTop, bodySize.height, rowCount, rowHeight]); Loading Loading @@ -302,7 +302,9 @@ export const Grid = withDisplayName('Grid')(({ <div ref={setBodyRef} className={classes.body} onScroll={handleScroll}> <ResizeObserver onResize={setBodySize} /> {placeholder} {Array.from(Array(rowRange.end - rowRange.start), (_, rowIndex) => ( {Array.from( { length: rowRange.end - rowRange.start }, (_, rowIndex) => ( <GridRowWrapper key={rowRange.start + rowIndex} RowComponent={RowComponent} Loading @@ -310,7 +312,8 @@ export const Grid = withDisplayName('Grid')(({ rowHeight={rowHeight} columns={columnMetadata.columns} /> ))} ) )} </div> </div> ); Loading
apps/demo/src/pages/packet-log.tsx +1 −1 Original line number Diff line number Diff line Loading @@ -160,7 +160,7 @@ const columns: Column[] = [ const item = globalState.logs[rowIndex]; if (!item.arg1String) { item.arg1String = item.arg0.toString(16).padStart(8, '0'); item.arg1String = item.arg1.toString(16).padStart(8, '0'); } const classes = useClasses(); Loading