@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.js
CHANGED
|
@@ -7917,9 +7917,9 @@ function useMenuController(props) {
|
|
|
7917
7917
|
setActiveIndex(currentIndex);
|
|
7918
7918
|
}, [setActiveIndex]);
|
|
7919
7919
|
const handleItemMouseLeave = react.useCallback(() => {
|
|
7920
|
+
setActiveIndex(-2);
|
|
7920
7921
|
rootElement == null ? void 0 : rootElement.focus();
|
|
7921
|
-
|
|
7922
|
-
}, [rootElement, setActiveIndex]);
|
|
7922
|
+
}, [setActiveIndex, rootElement]);
|
|
7923
7923
|
react.useEffect(() => {
|
|
7924
7924
|
if (!mounted) return;
|
|
7925
7925
|
const rafId = window.requestAnimationFrame(() => {
|