Skip to content

Commit 3c67d99

Browse files
committed
chore: removed old tab control code. It works if you have the section in view.
1 parent 5c8ba70 commit 3c67d99

File tree

1 file changed

+2
-11
lines changed
  • Website/components/datamodelview

1 file changed

+2
-11
lines changed

Website/components/datamodelview/List.tsx

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,7 @@ export const List = ({ setCurrentIndex }: IListProps) => {
3030
const parentRef = useRef<HTMLDivElement | null>(null);
3131
// used to relocate section after search/filter
3232
const [sectionVirtualItem, setSectionVirtualItem] = useState<string | null>(null);
33-
34-
// Track position before search for restoration
35-
const isTabSwitching = useRef(false);
36-
33+
3734
const handleCopyGroupLink = useCallback(async (groupName: string) => {
3835
const link = generateGroupLink(groupName);
3936
const success = await copyToClipboard(link);
@@ -274,13 +271,7 @@ export const List = ({ setCurrentIndex }: IListProps) => {
274271
entity={item.entity}
275272
group={item.group}
276273
onTabChange={(isChanging: boolean) => {
277-
isTabSwitching.current = isChanging;
278-
if (isChanging) {
279-
// Reset after a short delay to allow for the content change
280-
setTimeout(() => {
281-
isTabSwitching.current = false;
282-
}, 100);
283-
}
274+
284275
}}
285276
search={search}
286277
/>

0 commit comments

Comments
 (0)