We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7dabb49 commit 28dfeaeCopy full SHA for 28dfeae
apps/webapp/app/components/primitives/TreeView/TreeView.tsx
@@ -246,7 +246,7 @@ export function useTree<TData, TFilterValue>({
246
247
const scrollToNodeFn = useCallback(
248
(id: string) => {
249
- const itemIndex = tree.findIndex((node) => node.id === id);
+ const itemIndex = state.visibleNodeIds.findIndex((n) => n === id);
250
251
if (itemIndex !== -1) {
252
virtualizer.scrollToIndex(itemIndex, { align: "auto" });
0 commit comments