Skip to content

Commit ca027c3

Browse files
authored
Merge pull request #63 from delegateas/patches/v2-search
Patches for search functionality + optimizations
2 parents 0f55d89 + af7e99f commit ca027c3

6 files changed

Lines changed: 332 additions & 389 deletions

File tree

Website/components/datamodelview/DatamodelView.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export function DatamodelView() {
2727
}
2828

2929
function DatamodelViewContent() {
30-
const { scrollToSection } = useDatamodelView();
30+
const { scrollToSection, restoreSection } = useDatamodelView();
3131
const datamodelDispatch = useDatamodelViewDispatch();
3232
const { groups, filtered } = useDatamodelData();
3333
const datamodelDataDispatch = useDatamodelDataDispatch();
@@ -47,6 +47,8 @@ function DatamodelViewContent() {
4747
} else {
4848
// Clear search - reset to show all groups
4949
datamodelDataDispatch({ type: "SET_FILTERED", payload: [] });
50+
// Relocate section
51+
restoreSection();
5052
}
5153
}
5254
updateURL({ query: { globalsearch: searchValue.length >= 3 ? searchValue : "" } })
@@ -210,7 +212,7 @@ function DatamodelViewContent() {
210212
currentIndex={currentSearchIndex}
211213
totalResults={totalResults}
212214
/>
213-
<List />
215+
<List setCurrentIndex={setCurrentSearchIndex} />
214216
</div>
215217
</div>
216218
);

0 commit comments

Comments
 (0)