@linzjs/step-ag-grid 34.0.0 → 34.0.1
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/dist/step-ag-grid.esm.js
CHANGED
|
@@ -61170,7 +61170,7 @@ const Grid = ({
|
|
|
61170
61170
|
// ─── Spread Remaining Params ──────────────────
|
|
61171
61171
|
...params
|
|
61172
61172
|
}) => {
|
|
61173
|
-
if (isChromatic()) {
|
|
61173
|
+
if (isChromatic() && sizeColumns !== "fit") {
|
|
61174
61174
|
sizeColumns = "none";
|
|
61175
61175
|
}
|
|
61176
61176
|
const {
|
|
@@ -61405,13 +61405,15 @@ const Grid = ({
|
|
|
61405
61405
|
...colDef.cellClassRules,
|
|
61406
61406
|
"GridCell-readonly": (ccp) => !suppressReadOnlyStyle && !editable(ccp)
|
|
61407
61407
|
},
|
|
61408
|
-
// If chromatic we fix the size to minWidth if set otherwise 120px
|
|
61409
|
-
//
|
|
61410
|
-
|
|
61408
|
+
// If chromatic we fix the size to minWidth if set otherwise 120px, so non-deterministic
|
|
61409
|
+
// content measurement doesn't affect the snapshot - except under 'fit', which sizes via
|
|
61410
|
+
// flex (proportional to the container) rather than measured content, so it's already
|
|
61411
|
+
// deterministic and must keep the user's configured width.
|
|
61412
|
+
width: isChromatic() && sizeColumns !== "fit" ? colDef.minWidth || 120 : colDef.width
|
|
61411
61413
|
};
|
|
61412
61414
|
}
|
|
61413
61415
|
},
|
|
61414
|
-
[params.defaultColDef?.editable, params.loading, params.readOnly, suppressReadOnlyStyle]
|
|
61416
|
+
[params.defaultColDef?.editable, params.loading, params.readOnly, suppressReadOnlyStyle, sizeColumns]
|
|
61415
61417
|
);
|
|
61416
61418
|
const columnDefs = useMemo(() => {
|
|
61417
61419
|
return params.columnDefs.map(mapColDef);
|