Skip to content
6 changes: 4 additions & 2 deletions Website/components/datamodelview/DatamodelView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export function DatamodelView() {
}

function DatamodelViewContent() {
const { scrollToSection } = useDatamodelView();
const { scrollToSection, restoreSection } = useDatamodelView();
const datamodelDispatch = useDatamodelViewDispatch();
const { groups, filtered } = useDatamodelData();
const datamodelDataDispatch = useDatamodelDataDispatch();
Expand All @@ -47,6 +47,8 @@ function DatamodelViewContent() {
} else {
// Clear search - reset to show all groups
datamodelDataDispatch({ type: "SET_FILTERED", payload: [] });
// Relocate section
restoreSection();
}
}
updateURL({ query: { globalsearch: searchValue.length >= 3 ? searchValue : "" } })
Expand Down Expand Up @@ -210,7 +212,7 @@ function DatamodelViewContent() {
currentIndex={currentSearchIndex}
totalResults={totalResults}
/>
<List />
<List setCurrentIndex={setCurrentSearchIndex} />
</div>
</div>
);
Expand Down
Loading
Loading