@linzjs/step-ag-grid 27.3.0 → 27.3.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/dist/step-ag-grid.cjs +9 -5
- package/dist/step-ag-grid.cjs.map +1 -1
- package/dist/step-ag-grid.esm.js +9 -5
- package/dist/step-ag-grid.esm.js.map +1 -1
- package/package.json +17 -13
- package/src/components/Grid.tsx +4 -1
- package/src/components/clickInputWhenContainingCellClicked.tsx +4 -2
- package/src/react-menu3/components/MenuList.tsx +4 -2
package/dist/step-ag-grid.esm.js
CHANGED
|
@@ -665,9 +665,10 @@ const clickInputWhenContainingCellClicked = (params) => {
|
|
|
665
665
|
if (!cell)
|
|
666
666
|
return;
|
|
667
667
|
const input = cell.querySelector('input, button');
|
|
668
|
-
if (!input)
|
|
668
|
+
if (!input) {
|
|
669
669
|
return;
|
|
670
|
-
|
|
670
|
+
}
|
|
671
|
+
input.dispatchEvent(event);
|
|
671
672
|
};
|
|
672
673
|
setTimeout(clickInput, 20);
|
|
673
674
|
};
|
|
@@ -1789,8 +1790,9 @@ const MenuList = ({ ariaLabel, menuClassName, menuStyle, arrowClassName, arrowSt
|
|
|
1789
1790
|
}, [reposition]);
|
|
1790
1791
|
// Matt added window resize observer
|
|
1791
1792
|
useEffect(() => {
|
|
1792
|
-
if (typeof ResizeObserver !== 'function' || reposition === 'initial')
|
|
1793
|
+
if (typeof ResizeObserver !== 'function' || reposition === 'initial' || !menuRef.current) {
|
|
1793
1794
|
return;
|
|
1795
|
+
}
|
|
1794
1796
|
const callback = debounce$1(() => {
|
|
1795
1797
|
const { width, height } = menuRef.current.ownerDocument.body.getBoundingClientRect();
|
|
1796
1798
|
if (width === 0 || height === 0)
|
|
@@ -1839,7 +1841,7 @@ const MenuList = ({ ariaLabel, menuClassName, menuStyle, arrowClassName, arrowSt
|
|
|
1839
1841
|
// Use a timeout here because if set focus immediately, page might scroll unexpectedly.
|
|
1840
1842
|
const id = setTimeout(() => {
|
|
1841
1843
|
// If focus has already been set to a children element, don't set focus on menu or item
|
|
1842
|
-
if (!menuRef.current.contains(document.activeElement)) {
|
|
1844
|
+
if (menuRef.current && !menuRef.current.contains(document.activeElement)) {
|
|
1843
1845
|
// Handle popover portal focus
|
|
1844
1846
|
const popupElement = focusRef.current?.nextSibling;
|
|
1845
1847
|
if (!focusFirstInput(popupElement)) {
|
|
@@ -3218,7 +3220,9 @@ const Grid = ({ 'data-testid': dataTestId, defaultPostSort = true, rowSelection
|
|
|
3218
3220
|
}
|
|
3219
3221
|
return false;
|
|
3220
3222
|
},
|
|
3221
|
-
onCellClicked:
|
|
3223
|
+
onCellClicked: params.enableSelectionWithoutKeys || params.enableClickSelection
|
|
3224
|
+
? undefined
|
|
3225
|
+
: clickInputWhenContainingCellClicked,
|
|
3222
3226
|
} }) })] }));
|
|
3223
3227
|
};
|
|
3224
3228
|
|