@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.cjs
CHANGED
|
@@ -667,9 +667,10 @@ const clickInputWhenContainingCellClicked = (params) => {
|
|
|
667
667
|
if (!cell)
|
|
668
668
|
return;
|
|
669
669
|
const input = cell.querySelector('input, button');
|
|
670
|
-
if (!input)
|
|
670
|
+
if (!input) {
|
|
671
671
|
return;
|
|
672
|
-
|
|
672
|
+
}
|
|
673
|
+
input.dispatchEvent(event);
|
|
673
674
|
};
|
|
674
675
|
setTimeout(clickInput, 20);
|
|
675
676
|
};
|
|
@@ -1791,8 +1792,9 @@ const MenuList = ({ ariaLabel, menuClassName, menuStyle, arrowClassName, arrowSt
|
|
|
1791
1792
|
}, [reposition]);
|
|
1792
1793
|
// Matt added window resize observer
|
|
1793
1794
|
React.useEffect(() => {
|
|
1794
|
-
if (typeof ResizeObserver !== 'function' || reposition === 'initial')
|
|
1795
|
+
if (typeof ResizeObserver !== 'function' || reposition === 'initial' || !menuRef.current) {
|
|
1795
1796
|
return;
|
|
1797
|
+
}
|
|
1796
1798
|
const callback = lodashEs.debounce(() => {
|
|
1797
1799
|
const { width, height } = menuRef.current.ownerDocument.body.getBoundingClientRect();
|
|
1798
1800
|
if (width === 0 || height === 0)
|
|
@@ -1841,7 +1843,7 @@ const MenuList = ({ ariaLabel, menuClassName, menuStyle, arrowClassName, arrowSt
|
|
|
1841
1843
|
// Use a timeout here because if set focus immediately, page might scroll unexpectedly.
|
|
1842
1844
|
const id = setTimeout(() => {
|
|
1843
1845
|
// If focus has already been set to a children element, don't set focus on menu or item
|
|
1844
|
-
if (!menuRef.current.contains(document.activeElement)) {
|
|
1846
|
+
if (menuRef.current && !menuRef.current.contains(document.activeElement)) {
|
|
1845
1847
|
// Handle popover portal focus
|
|
1846
1848
|
const popupElement = focusRef.current?.nextSibling;
|
|
1847
1849
|
if (!focusFirstInput(popupElement)) {
|
|
@@ -3220,7 +3222,9 @@ const Grid = ({ 'data-testid': dataTestId, defaultPostSort = true, rowSelection
|
|
|
3220
3222
|
}
|
|
3221
3223
|
return false;
|
|
3222
3224
|
},
|
|
3223
|
-
onCellClicked:
|
|
3225
|
+
onCellClicked: params.enableSelectionWithoutKeys || params.enableClickSelection
|
|
3226
|
+
? undefined
|
|
3227
|
+
: clickInputWhenContainingCellClicked,
|
|
3224
3228
|
} }) })] }));
|
|
3225
3229
|
};
|
|
3226
3230
|
|