diff --git a/packages/sanity/src/core/components/commandList/CommandList.tsx b/packages/sanity/src/core/components/commandList/CommandList.tsx index 372803dcbdc..f94751b4554 100644 --- a/packages/sanity/src/core/components/commandList/CommandList.tsx +++ b/packages/sanity/src/core/components/commandList/CommandList.tsx @@ -1,4 +1,4 @@ -import {Box, rem, Theme} from '@sanity/ui' +import {Box, rem, Stack, Theme} from '@sanity/ui' import {ScrollToOptions, useVirtualizer, Virtualizer} from '@tanstack/react-virtual' import throttle from 'lodash/throttle' import React, { @@ -126,13 +126,13 @@ export const CommandList = forwardRef(funct const commandListId = useRef(useId()) const activeIndexRef = useRef(initialIndex ?? 0) - const [childContainerElement, setChildContainerElement] = useState(null) + const [childContainerElement, setChildContainerElement] = useState(null) const [hovered, setHovered] = useState(false) const [pointerOverlayElement, setPointerOverlayElement] = useState(null) - const [virtualListElement, setVirtualListElement] = useState(null) + const [virtualListElement, setVirtualListElement] = useState(null) const handleChange = useCallback( - (v: Virtualizer) => { + (v: Virtualizer) => { if (!onEndReached) return const [lastItem] = [...v.getVirtualItems()].reverse() @@ -596,6 +596,7 @@ export const CommandList = forwardRef(funct