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