@linzjs/step-ag-grid 27.3.3 → 28.0.0

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.
Files changed (43) hide show
  1. package/dist/src/utils/__tests__/storybookTestUtil.ts +1 -1
  2. package/dist/step-ag-grid.cjs +7 -1
  3. package/dist/step-ag-grid.cjs.map +1 -1
  4. package/dist/step-ag-grid.esm.js +7 -1
  5. package/dist/step-ag-grid.esm.js.map +1 -1
  6. package/package.json +24 -24
  7. package/src/components/Grid.tsx +9 -0
  8. package/src/components/GridCellMultiSelectClassRules.tsx +1 -1
  9. package/src/stories/components/ActionButton.stories.tsx +1 -1
  10. package/src/stories/grid/GridDragRow.stories.tsx +1 -1
  11. package/src/stories/grid/GridFilterButtons.stories.tsx +1 -1
  12. package/src/stories/grid/GridNoRowsOverlay.stories.tsx +2 -3
  13. package/src/stories/grid/GridNonEditableRow.stories.tsx +3 -2
  14. package/src/stories/grid/GridPinnedRow.stories.tsx +1 -1
  15. package/src/stories/grid/GridPopoutContextMenu.stories.tsx +1 -1
  16. package/src/stories/grid/GridPopoutEditBoolean.stories.tsx +1 -1
  17. package/src/stories/grid/GridPopoutEditGeneric.stories.tsx +1 -1
  18. package/src/stories/grid/GridPopoutEditGenericTextArea.stories.tsx +1 -1
  19. package/src/stories/grid/GridPopoverEditBearing.stories.tsx +1 -1
  20. package/src/stories/grid/GridPopoverEditDropDown.stories.tsx +1 -1
  21. package/src/stories/grid/GridPopoverEditMultiSelect.stories.tsx +1 -1
  22. package/src/stories/grid/GridPopoverEditMultiSelectGrid.stories.tsx +1 -1
  23. package/src/stories/grid/GridReadOnly.stories.tsx +1 -1
  24. package/src/stories/grid/GridViewList.stories.tsx +1 -1
  25. package/src/stories/grid/gridFormInteraction/GridFormDropDownInteraction.stories.tsx +2 -2
  26. package/src/stories/grid/gridFormInteraction/GridFormEditBearingCorrectionInteraction.stories.tsx +2 -2
  27. package/src/stories/grid/gridFormInteraction/GridFormEditBearingInteraction.stories.tsx +2 -2
  28. package/src/stories/grid/gridFormInteraction/GridFormMultiSelectGridInteraction.stories.tsx +2 -2
  29. package/src/stories/grid/gridFormInteraction/GridFormMultiSelectInteraction.stories.tsx +2 -2
  30. package/src/stories/grid/gridFormInteraction/GridFormPopoverMenuInteraction.stories.tsx +3 -3
  31. package/src/stories/grid/gridFormInteraction/GridFormTextAreaInteraction.stories.tsx +2 -2
  32. package/src/stories/grid/gridFormInteraction/GridFormTextInputInteraction.stories.tsx +2 -2
  33. package/src/stories/grid/gridFormStatic/GridFormDropDown.stories.tsx +1 -1
  34. package/src/stories/grid/gridFormStatic/GridFormEditBearing.stories.tsx +1 -1
  35. package/src/stories/grid/gridFormStatic/GridFormEditBearingCorrection.stories.tsx +1 -1
  36. package/src/stories/grid/gridFormStatic/GridFormMessage.stories.tsx +1 -1
  37. package/src/stories/grid/gridFormStatic/GridFormMultiSelect.stories.tsx +1 -1
  38. package/src/stories/grid/gridFormStatic/GridFormPopoverMenu.stories.tsx +1 -1
  39. package/src/stories/grid/gridFormStatic/GridFormTextArea.stories.tsx +1 -1
  40. package/src/stories/grid/gridFormStatic/GridFormTextInput.stories.tsx +1 -1
  41. package/src/stories/grid/interactions/GridKeyboardInteractions.stories.tsx +4 -4
  42. package/src/stories/react-menu/ReactMenu.stories.tsx +4 -4
  43. package/src/utils/__tests__/storybookTestUtil.ts +1 -1
@@ -1,4 +1,4 @@
1
- import { expect, waitFor } from '@storybook/test';
1
+ import { expect, waitFor } from 'storybook/test';
2
2
 
3
3
  export const waitForGridReady = ({ canvasElement }: { canvasElement: HTMLElement }) =>
4
4
  waitFor(() => expect(canvasElement.querySelector('.Grid-ready')).toBeInTheDocument(), { timeout: 5000 });
@@ -3183,6 +3183,12 @@ const Grid = ({ 'data-testid': dataTestId, defaultPostSort = true, rowSelection
3183
3183
  void params.onRowDragEnd({ movedRow, targetRow, direction: yDiff > 0 ? 1 : -1 });
3184
3184
  }
3185
3185
  }, [params, clearHighlightRowClasses]);
3186
+ React.useEffect(() => {
3187
+ if (params.setExternalSelectedItems && selectable == null) {
3188
+ console.warn('<Grid/> has setExternalSelectedItems parameter, but is missing selectable parameter,' +
3189
+ 'this will cause weird delays in editing.\nIf you need to hide selection column use hideSelectColumn=true');
3190
+ }
3191
+ }, [params.setExternalSelectedItems, selectable]);
3186
3192
  // This is setting a ref in the GridContext so won't be triggering an update loop
3187
3193
  setOnCellEditingComplete(params.onCellEditingComplete);
3188
3194
  const selectWidth = params.hideSelectColumn ? 0 : selectable && params.onRowDragEnd ? 76 : 48;
@@ -3287,7 +3293,7 @@ const GridCellMultiSelectClassRules = {
3287
3293
  .getSelectedNodes()
3288
3294
  ?.map((row) => row.id)
3289
3295
  ?.includes(node.id) &&
3290
- api.getEditingCells().some((cell) => cell.column.getColDef() === colDef));
3296
+ api.getEditingCells().some((cell) => cell.colId === colDef.colId));
3291
3297
  },
3292
3298
  };
3293
3299