Fix bugs tied to jotai migration (#18227)

Fixing a few bugs:
- CommandMenu not reactive
- Filtering on index view infinite loop
This commit is contained in:
Charles Bochet
2026-02-25 17:11:12 +01:00
committed by GitHub
parent 001c2097a3
commit 1fa55bfd02
31 changed files with 343 additions and 238 deletions
@@ -1,3 +1,5 @@
import { useCallback } from 'react';
import { ScrollWrapperComponentInstanceContext } from '@/ui/utilities/scroll/states/contexts/ScrollWrapperComponentInstanceContext';
import { useAvailableComponentInstanceIdOrThrow } from '@/ui/utilities/state/component-state/hooks/useAvailableComponentInstanceIdOrThrow';
import { useHTMLElementByIdWhenAvailable } from '~/hooks/useHTMLElementByIdWhenAvailable';
@@ -15,13 +17,13 @@ export const useScrollWrapperHTMLElement = (
const { element: scrollWrapperHTMLElement } =
useHTMLElementByIdWhenAvailable(scrollWrapperId);
const getScrollWrapperElement = () => {
const getScrollWrapperElement = useCallback(() => {
const scrollWrapperElement = document.getElementById(scrollWrapperId);
return {
scrollWrapperElement,
};
};
}, [scrollWrapperId]);
return {
scrollWrapperHTMLElement,