@linzjs/step-ag-grid 8.2.0 → 8.2.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/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": "8.2.0",
5
+ "version": "8.2.1",
6
6
  "keywords": [
7
7
  "aggrid",
8
8
  "ag-grid",
@@ -297,16 +297,6 @@ export const Grid = (params: GridProps): JSX.Element => {
297
297
  [startCellEditing],
298
298
  );
299
299
 
300
- const onCellEditingStopped = useCallback(
301
- (event: CellEvent) => {
302
- refreshSelectedRows(event);
303
- // The grid loses cell focus after editing
304
- const cell = event.api.getFocusedCell();
305
- cell && event.api.setFocusedCell(cell.rowIndex, cell.column);
306
- },
307
- [refreshSelectedRows],
308
- );
309
-
310
300
  // When rows added or removed then resize columns
311
301
  useEffect(() => {
312
302
  if (columnDefs?.length) {
@@ -354,7 +344,6 @@ export const Grid = (params: GridProps): JSX.Element => {
354
344
  onCellClicked={onCellClicked}
355
345
  onCellDoubleClicked={onCellDoubleClick}
356
346
  onCellEditingStarted={refreshSelectedRows}
357
- onCellEditingStopped={onCellEditingStopped}
358
347
  domLayout={params.domLayout}
359
348
  columnDefs={columnDefs}
360
349
  rowData={params.rowData}
@@ -95,6 +95,8 @@ export const GridFormPopoverMenu = <RowType extends GridBaseRow>(props: GridForm
95
95
  setSubComponentSelected(subComponentSelected === item ? null : item);
96
96
  e.keepOpen = true;
97
97
  } else {
98
+ subComponentIsValid.current = true;
99
+ setSubSelectedValue(null);
98
100
  await updateValue(async () => actionClick(item), e.key === "Tab" ? (e.shiftKey ? -1 : 1) : 0);
99
101
  }
100
102
  },
@@ -120,6 +120,10 @@ const GridReadOnlyTemplate: ComponentStory<typeof Grid> = (props: GridProps) =>
120
120
  {
121
121
  multiEdit: true,
122
122
  editorParams: {
123
+ defaultAction: async ({ menuOption }) => {
124
+ // eslint-disable-next-line no-console
125
+ console.log("clicked", { menuOption });
126
+ },
123
127
  options: async (selectedItems) => {
124
128
  // Just doing a timeout here to demonstrate deferred loading
125
129
  await wait(500);
@@ -22,7 +22,7 @@ const Template: ComponentStory<typeof GridFormMultiSelect> = (props) => {
22
22
  "With options",
23
23
  {
24
24
  options: [
25
- { label: "One", value: 0 },
25
+ { label: "One", value: 0, checked: true },
26
26
  { label: "Two", value: 1 },
27
27
  ],
28
28
  },
@@ -34,7 +34,7 @@ const Template: ComponentStory<typeof GridFormMultiSelect> = (props) => {
34
34
  options: [
35
35
  { label: "One", value: 0 },
36
36
  { label: "With warning", value: 1, warning: "Test warning" },
37
- { label: "Three", value: 2 },
37
+ { label: "Three", value: 2, checked: true },
38
38
  ],
39
39
  },
40
40
  ],