@linzjs/step-ag-grid 1.4.1 → 1.4.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": "1.4.1",
5
+ "version": "1.4.2",
6
6
  "main": "dist/index.js",
7
7
  "typings": "dist/index.d.ts",
8
8
  "module": "dist/step-ag-grid.esm.js",
@@ -5,6 +5,7 @@ import { ControlledMenu } from "@szhsin/react-menu";
5
5
  import { GridFormProps } from "./GridCell";
6
6
  import { hasParentClass } from "@utils/util";
7
7
  import { GridBaseRow } from "./Grid";
8
+ import { isEmpty } from "lodash-es";
8
9
 
9
10
  export const useGridPopoverHook = <RowType extends GridBaseRow>(
10
11
  props: GridFormProps<RowType>,
@@ -84,7 +85,7 @@ export const useGridPopoverHook = <RowType extends GridBaseRow>(
84
85
  {anchorRef.current && (
85
86
  <ControlledMenu
86
87
  state={isOpen ? "open" : "closed"}
87
- portal={true}
88
+ portal={isEmpty(document.querySelectorAll(".PopoutWindowContainer"))}
88
89
  unmountOnClose={true}
89
90
  anchorRef={anchorRef}
90
91
  menuClassName={"lui-menu"}
@@ -21,7 +21,7 @@ export interface MenuOption<RowType> {
21
21
  label: JSX.Element | string | MenuSeparatorType;
22
22
  action?: (selectedRows: RowType[]) => Promise<boolean>;
23
23
  disabled?: string | boolean;
24
- multiEdit: boolean;
24
+ supportsMultiEdit: boolean;
25
25
  }
26
26
 
27
27
  /**
@@ -65,7 +65,7 @@ export const GridFormPopoutMenu = <RowType extends GridBaseRow>(props: GridFormP
65
65
  const selectedRowCount = props.selectedRows.length;
66
66
 
67
67
  const filteredOptions = options?.filter((menuOption) => {
68
- return menuOption.label === MenuSeparator || selectedRowCount === 1 || menuOption.multiEdit;
68
+ return menuOption.label === MenuSeparator || selectedRowCount === 1 || menuOption.supportsMultiEdit;
69
69
  });
70
70
 
71
71
  const { popoverWrapper } = useGridPopoverHook(props);
@@ -98,7 +98,7 @@ const GridReadOnlyTemplate: ComponentStory<typeof Grid> = (props: GridProps) =>
98
98
  await wait(1500);
99
99
  return true;
100
100
  },
101
- multiEdit: false,
101
+ supportsMultiEdit: false,
102
102
  },
103
103
  {
104
104
  label: "Multi-edit",
@@ -107,12 +107,12 @@ const GridReadOnlyTemplate: ComponentStory<typeof Grid> = (props: GridProps) =>
107
107
  await wait(1500);
108
108
  return true;
109
109
  },
110
- multiEdit: true,
110
+ supportsMultiEdit: true,
111
111
  },
112
112
  {
113
113
  label: "Disabled item",
114
114
  disabled: "Disabled for test",
115
- multiEdit: true,
115
+ supportsMultiEdit: true,
116
116
  },
117
117
  ];
118
118
  },