@opencorestack/opengridx 1.0.4 → 1.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -0
- package/dist/opengridx.es.js +576 -571
- package/dist/opengridx.es.js.map +1 -1
- package/dist/opengridx.umd.js +5 -5
- package/dist/opengridx.umd.js.map +1 -1
- package/lib/components/DataGrid/DataGrid.tsx +14 -1
- package/package.json +1 -1
|
@@ -513,6 +513,19 @@ export function DataGrid<R extends GridRowModel = GridRowModel>(props: DataGridP
|
|
|
513
513
|
pageSize: effectivePaginationModel.pageSize,
|
|
514
514
|
});
|
|
515
515
|
|
|
516
|
+
// Merge layout-computed widths (which include flex resolution) with user-resize
|
|
517
|
+
// overrides. The footer and other consumers that receive `columnWidths` only get
|
|
518
|
+
// the resize-override map, which has no entry for flex columns that haven't been
|
|
519
|
+
// manually resized — causing them to fall back to the raw `col.width` prop instead
|
|
520
|
+
// of the actual rendered width.
|
|
521
|
+
const resolvedColumnWidths = useMemo(() => {
|
|
522
|
+
const result: Record<string, number> = {};
|
|
523
|
+
for (const col of [...layout.leftPinnedCols, ...layout.unpinnedColsWithWidth, ...layout.rightPinnedCols]) {
|
|
524
|
+
if (!col.isSpacer) result[col.field] = col.width;
|
|
525
|
+
}
|
|
526
|
+
return { ...result, ...columnWidths };
|
|
527
|
+
}, [layout.leftPinnedCols, layout.unpinnedColsWithWidth, layout.rightPinnedCols, columnWidths]);
|
|
528
|
+
|
|
516
529
|
useEffect(() => {
|
|
517
530
|
gridData.apiRef.current.scrollToIndexes = ({ rowIndex, colIndex }) => {
|
|
518
531
|
const el = viewportRef.current;
|
|
@@ -977,7 +990,7 @@ export function DataGrid<R extends GridRowModel = GridRowModel>(props: DataGridP
|
|
|
977
990
|
columns={orderedColumns as unknown as GridColDef[]}
|
|
978
991
|
aggregationModel={aggregationModel}
|
|
979
992
|
aggregationResult={aggregationResult}
|
|
980
|
-
columnWidths={
|
|
993
|
+
columnWidths={resolvedColumnWidths}
|
|
981
994
|
rowHeight={rowHeight}
|
|
982
995
|
checkboxSelection={checkboxSelection}
|
|
983
996
|
hasDetailPanel={hasDetailPanel}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opencorestack/opengridx",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.5",
|
|
4
4
|
"description": "OpenGridX: High-performance React data infrastructure. Unlock advanced Row Grouping, Excel Export, and Column Pinning without the usual \"Pro\" gatekeeping. Built for speed, scale, and complete architectural freedom. Fully open, virtualization-ready, and feature-complete.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/opengridx.umd.js",
|