@linzjs/step-ag-grid 2.2.0 → 2.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/dist/index.js +17 -6
- package/dist/index.js.map +1 -1
- package/dist/src/index.d.ts +3 -0
- package/dist/src/react-menu3/components/ControlledMenu.d.ts +2 -2
- package/dist/src/react-menu3/types.d.ts +4 -0
- package/dist/step-ag-grid.esm.js +10 -7
- package/dist/step-ag-grid.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/GridPopoverHook.tsx +1 -0
- package/src/index.ts +3 -0
- package/src/react-menu3/components/ControlledMenu.tsx +7 -4
- package/src/react-menu3/types.ts +5 -0
package/package.json
CHANGED
|
@@ -49,6 +49,7 @@ export const useGridPopoverHook = <RowType extends GridBaseRow>(props: GridPopov
|
|
|
49
49
|
viewScroll={"auto"}
|
|
50
50
|
dontShrinkIfDirectionIsTop={true}
|
|
51
51
|
className={props.className}
|
|
52
|
+
closeMenuExclusionClassName={"ReactModal__Content"}
|
|
52
53
|
>
|
|
53
54
|
{saving && ( // This is the overlay that prevents editing when the editor is saving
|
|
54
55
|
<div
|
package/src/index.ts
CHANGED
|
@@ -27,6 +27,9 @@ export { GridPopoverEditDropDown } from "./components/gridPopoverEdit/GridPopove
|
|
|
27
27
|
export { GridPopoverMessage } from "./components/gridPopoverEdit/GridPopoverMessage";
|
|
28
28
|
export { GridPopoverTextArea } from "./components/gridPopoverEdit/GridPopoverTextArea";
|
|
29
29
|
export { GridPopoverTextInput } from "./components/gridPopoverEdit/GridPopoverTextInput";
|
|
30
|
+
export * from "./components/gridForm/GridFormDropDown";
|
|
31
|
+
export * from "./components/gridForm/GridFormMultiSelect";
|
|
32
|
+
export * from "./components/gridForm/GridFormPopoutMenu";
|
|
30
33
|
|
|
31
34
|
export { GridHeaderSelect } from "./components/gridHeader/GridHeaderSelect";
|
|
32
35
|
|
|
@@ -40,6 +40,7 @@ export const ControlledMenuFr = (
|
|
|
40
40
|
onItemClick,
|
|
41
41
|
onClose,
|
|
42
42
|
saveButtonRef,
|
|
43
|
+
closeMenuExclusionClassName,
|
|
43
44
|
...restProps
|
|
44
45
|
}: ControlledMenuProps & { saveButtonRef?: MutableRefObject<HTMLButtonElement | null> },
|
|
45
46
|
externalRef: ForwardedRef<HTMLUListElement>,
|
|
@@ -75,14 +76,16 @@ export const ControlledMenuFr = (
|
|
|
75
76
|
],
|
|
76
77
|
);
|
|
77
78
|
|
|
78
|
-
const clickIsWithinMenu = useCallback(
|
|
79
|
-
|
|
80
|
-
|
|
79
|
+
const clickIsWithinMenu = useCallback(
|
|
80
|
+
(ev: MouseEvent) =>
|
|
81
|
+
hasParentClass("szh-menu--state-open", ev.target as Node) ||
|
|
82
|
+
(closeMenuExclusionClassName && hasParentClass(closeMenuExclusionClassName, ev.target as Node)),
|
|
83
|
+
[closeMenuExclusionClassName],
|
|
84
|
+
);
|
|
81
85
|
|
|
82
86
|
const handleScreenEventForSave = useCallback(
|
|
83
87
|
(ev: MouseEvent) => {
|
|
84
88
|
if (!clickIsWithinMenu(ev)) {
|
|
85
|
-
//!ev.currentTarget.contains(ev.relatedTarget || document.activeElement)) {
|
|
86
89
|
ev.preventDefault();
|
|
87
90
|
ev.stopPropagation();
|
|
88
91
|
// FIXME There's an issue in React17
|
package/src/react-menu3/types.ts
CHANGED
|
@@ -439,4 +439,9 @@ export interface ControlledMenuProps extends RootMenuProps, ExtraMenuProps {
|
|
|
439
439
|
* Event fired when menu is about to close.
|
|
440
440
|
*/
|
|
441
441
|
onClose?: EventHandler<MenuCloseEvent>;
|
|
442
|
+
|
|
443
|
+
/**
|
|
444
|
+
* When clicking outside the menu to close, anything with this class will not cause a close.
|
|
445
|
+
*/
|
|
446
|
+
closeMenuExclusionClassName?: string;
|
|
442
447
|
}
|