@linzjs/step-ag-grid 29.2.1 → 29.2.2

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/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@linzjs/step-ag-grid",
3
3
  "repository": "github:linz/step-ag-grid.git",
4
4
  "license": "MIT",
5
- "version": "29.2.1",
5
+ "version": "29.2.2",
6
6
  "keywords": [
7
7
  "aggrid",
8
8
  "ag-grid",
@@ -126,7 +126,6 @@ export interface GridProps<TData extends GridBaseRow = GridBaseRow> {
126
126
  pinnedBottomRowData?: GridOptions['pinnedBottomRowData'];
127
127
  onRowClicked?: (event: RowClickedEvent) => void;
128
128
  onRowDoubleClicked?: (event: RowDoubleClickedEvent) => void;
129
- allowResizeInStorybook?: boolean;
130
129
  }
131
130
 
132
131
  /**
@@ -145,7 +144,6 @@ export const Grid = <TData extends GridBaseRow = GridBaseRow>({
145
144
  rowData,
146
145
  rowHeight = theme === 'ag-theme-step-default' ? 40 : theme === 'ag-theme-step-compact' ? 36 : 40,
147
146
  selectable,
148
- allowResizeInStorybook,
149
147
  onCellFocused: paramsOnCellFocused,
150
148
  ...params
151
149
  }: GridProps<TData>): ReactElement => {
@@ -587,7 +585,7 @@ export const Grid = <TData extends GridBaseRow = GridBaseRow>({
587
585
  */
588
586
  const onGridSizeChanged = useCallback(
589
587
  (event: GridSizeChangedEvent<TData>) => {
590
- if (sizeColumns !== 'none' && (!(window as any).__STORYBOOK_PREVIEW__ || allowResizeInStorybook)) {
588
+ if (sizeColumns !== 'none') {
591
589
  const columnLimits = [
592
590
  ...userSizedColIds.current.entries().map(
593
591
  ([c, w]): IColumnLimit => ({
@@ -599,7 +597,7 @@ export const Grid = <TData extends GridBaseRow = GridBaseRow>({
599
597
  event.api.sizeColumnsToFit({ columnLimits });
600
598
  }
601
599
  },
602
- [allowResizeInStorybook, sizeColumns],
600
+ [sizeColumns],
603
601
  );
604
602
 
605
603
  /**
@@ -161,7 +161,7 @@ export const PanelContentsWithResize = () => {
161
161
  <GridUpdatingContextProvider>
162
162
  <GridContextProvider>
163
163
  <GridWrapper>
164
- <Grid columnDefs={columnDefs} rowData={rowData} onContentSize={resizePanel} allowResizeInStorybook={true} />
164
+ <Grid columnDefs={columnDefs} rowData={rowData} onContentSize={resizePanel} />
165
165
  </GridWrapper>
166
166
  </GridContextProvider>
167
167
  </GridUpdatingContextProvider>