@sanity/ui 1.7.2 → 1.7.3
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.esm.js +2 -2
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/menu/__workshop__/index.ts +5 -0
- package/src/components/menu/__workshop__/shouldFocus.tsx +46 -0
- package/src/components/menu/useMenuController.ts +7 -2
package/dist/index.esm.js
CHANGED
|
@@ -7904,9 +7904,9 @@ function useMenuController(props) {
|
|
|
7904
7904
|
setActiveIndex(currentIndex);
|
|
7905
7905
|
}, [setActiveIndex]);
|
|
7906
7906
|
const handleItemMouseLeave = useCallback(() => {
|
|
7907
|
+
setActiveIndex(-2);
|
|
7907
7908
|
rootElement == null ? void 0 : rootElement.focus();
|
|
7908
|
-
|
|
7909
|
-
}, [rootElement, setActiveIndex]);
|
|
7909
|
+
}, [setActiveIndex, rootElement]);
|
|
7910
7910
|
useEffect(() => {
|
|
7911
7911
|
if (!mounted) return;
|
|
7912
7912
|
const rafId = window.requestAnimationFrame(() => {
|