mirror of
https://github.com/rowyio/rowy.git
synced 2025-12-28 16:06:41 +01:00
ROWY-791 fix virtualization not handling minimum width correctly
This commit is contained in:
@@ -68,11 +68,11 @@ export function useVirtualization(
|
||||
const columnDef = leafColumns[index].columnDef;
|
||||
const schemaWidth = columnDef.size;
|
||||
const localWidth = columnSizing[columnDef.id || ""];
|
||||
const definedWidth = localWidth || schemaWidth;
|
||||
|
||||
return Math.max(
|
||||
MIN_COL_WIDTH,
|
||||
localWidth || schemaWidth || DEFAULT_COL_WIDTH
|
||||
);
|
||||
if (definedWidth === undefined) return DEFAULT_COL_WIDTH;
|
||||
if (definedWidth < MIN_COL_WIDTH) return MIN_COL_WIDTH;
|
||||
return definedWidth;
|
||||
},
|
||||
[leafColumns, columnSizing]
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user