@linzjs/step-ag-grid 27.3.2 → 27.3.4

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 (46) hide show
  1. package/dist/src/utils/__tests__/storybookTestUtil.ts +1 -1
  2. package/dist/src/utils/__tests__/testUtil.ts +1 -1
  3. package/dist/src/utils/__tests__/vitestUtil.ts +1 -1
  4. package/dist/step-ag-grid.cjs +6 -0
  5. package/dist/step-ag-grid.cjs.map +1 -1
  6. package/dist/step-ag-grid.esm.js +6 -0
  7. package/dist/step-ag-grid.esm.js.map +1 -1
  8. package/package.json +28 -28
  9. package/src/components/Grid.tsx +9 -0
  10. package/src/stories/components/ActionButton.stories.tsx +1 -1
  11. package/src/stories/grid/GridDragRow.stories.tsx +1 -1
  12. package/src/stories/grid/GridFilterButtons.stories.tsx +1 -1
  13. package/src/stories/grid/GridNoRowsOverlay.stories.tsx +2 -3
  14. package/src/stories/grid/GridNonEditableRow.stories.tsx +3 -2
  15. package/src/stories/grid/GridPinnedRow.stories.tsx +1 -1
  16. package/src/stories/grid/GridPopoutContextMenu.stories.tsx +1 -1
  17. package/src/stories/grid/GridPopoutEditBoolean.stories.tsx +1 -1
  18. package/src/stories/grid/GridPopoutEditGeneric.stories.tsx +1 -1
  19. package/src/stories/grid/GridPopoutEditGenericTextArea.stories.tsx +1 -1
  20. package/src/stories/grid/GridPopoverEditBearing.stories.tsx +1 -1
  21. package/src/stories/grid/GridPopoverEditDropDown.stories.tsx +1 -1
  22. package/src/stories/grid/GridPopoverEditMultiSelect.stories.tsx +1 -1
  23. package/src/stories/grid/GridPopoverEditMultiSelectGrid.stories.tsx +1 -1
  24. package/src/stories/grid/GridReadOnly.stories.tsx +1 -1
  25. package/src/stories/grid/GridViewList.stories.tsx +1 -1
  26. package/src/stories/grid/gridFormInteraction/GridFormDropDownInteraction.stories.tsx +2 -2
  27. package/src/stories/grid/gridFormInteraction/GridFormEditBearingCorrectionInteraction.stories.tsx +2 -2
  28. package/src/stories/grid/gridFormInteraction/GridFormEditBearingInteraction.stories.tsx +2 -2
  29. package/src/stories/grid/gridFormInteraction/GridFormMultiSelectGridInteraction.stories.tsx +2 -2
  30. package/src/stories/grid/gridFormInteraction/GridFormMultiSelectInteraction.stories.tsx +2 -2
  31. package/src/stories/grid/gridFormInteraction/GridFormPopoverMenuInteraction.stories.tsx +3 -3
  32. package/src/stories/grid/gridFormInteraction/GridFormTextAreaInteraction.stories.tsx +2 -2
  33. package/src/stories/grid/gridFormInteraction/GridFormTextInputInteraction.stories.tsx +2 -2
  34. package/src/stories/grid/gridFormStatic/GridFormDropDown.stories.tsx +1 -1
  35. package/src/stories/grid/gridFormStatic/GridFormEditBearing.stories.tsx +1 -1
  36. package/src/stories/grid/gridFormStatic/GridFormEditBearingCorrection.stories.tsx +1 -1
  37. package/src/stories/grid/gridFormStatic/GridFormMessage.stories.tsx +1 -1
  38. package/src/stories/grid/gridFormStatic/GridFormMultiSelect.stories.tsx +1 -1
  39. package/src/stories/grid/gridFormStatic/GridFormPopoverMenu.stories.tsx +1 -1
  40. package/src/stories/grid/gridFormStatic/GridFormTextArea.stories.tsx +1 -1
  41. package/src/stories/grid/gridFormStatic/GridFormTextInput.stories.tsx +1 -1
  42. package/src/stories/grid/interactions/GridKeyboardInteractions.stories.tsx +4 -4
  43. package/src/stories/react-menu/ReactMenu.stories.tsx +4 -4
  44. package/src/utils/__tests__/storybookTestUtil.ts +1 -1
  45. package/src/utils/__tests__/testUtil.ts +1 -1
  46. package/src/utils/__tests__/vitestUtil.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 });
@@ -98,7 +98,7 @@ const _selectRow = async (
98
98
  const row = await findRow(rowId, within);
99
99
  const isSelected = row.className.includes('ag-row-selected');
100
100
  if (select === 'toggle' || (select === 'select' && !isSelected) || (select === 'deselect' && isSelected)) {
101
- const cell = await findCell(rowId, 'selection', within);
101
+ const cell = await findCell(rowId, 'ag-Grid-SelectionColumn', within);
102
102
  await user.click(cell);
103
103
  await waitFor(async () => {
104
104
  const row = await findRow(rowId, within);
@@ -99,7 +99,7 @@ const _selectRow = async (
99
99
  const row = await findRow(rowId, within);
100
100
  const isSelected = row.className.includes('ag-row-selected');
101
101
  if (select === 'toggle' || (select === 'select' && !isSelected) || (select === 'deselect' && isSelected)) {
102
- const cell = await findCell(rowId, 'selection', within);
102
+ const cell = await findCell(rowId, 'ag-Grid-SelectionColumn', within);
103
103
  await user.click(cell);
104
104
  await waitFor(async () => {
105
105
  const row = await findRow(rowId, within);
@@ -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;