@linzjs/step-ag-grid 27.3.1 → 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
CHANGED
|
@@ -1792,8 +1792,9 @@ const MenuList = ({ ariaLabel, menuClassName, menuStyle, arrowClassName, arrowSt
|
|
|
1792
1792
|
}, [reposition]);
|
|
1793
1793
|
// Matt added window resize observer
|
|
1794
1794
|
React.useEffect(() => {
|
|
1795
|
-
if (typeof ResizeObserver !== 'function' || reposition === 'initial')
|
|
1795
|
+
if (typeof ResizeObserver !== 'function' || reposition === 'initial' || !menuRef.current) {
|
|
1796
1796
|
return;
|
|
1797
|
+
}
|
|
1797
1798
|
const callback = lodashEs.debounce(() => {
|
|
1798
1799
|
const { width, height } = menuRef.current.ownerDocument.body.getBoundingClientRect();
|
|
1799
1800
|
if (width === 0 || height === 0)
|
|
@@ -1842,7 +1843,7 @@ const MenuList = ({ ariaLabel, menuClassName, menuStyle, arrowClassName, arrowSt
|
|
|
1842
1843
|
// Use a timeout here because if set focus immediately, page might scroll unexpectedly.
|
|
1843
1844
|
const id = setTimeout(() => {
|
|
1844
1845
|
// If focus has already been set to a children element, don't set focus on menu or item
|
|
1845
|
-
if (!menuRef.current.contains(document.activeElement)) {
|
|
1846
|
+
if (menuRef.current && !menuRef.current.contains(document.activeElement)) {
|
|
1846
1847
|
// Handle popover portal focus
|
|
1847
1848
|
const popupElement = focusRef.current?.nextSibling;
|
|
1848
1849
|
if (!focusFirstInput(popupElement)) {
|