feat(react/widgets): search results interfering with SQL results + bad note path style

This commit is contained in:
Elian Doran
2025-08-29 16:28:49 +03:00
parent 735e91e636
commit f2ce8b9f3c

View File

@@ -19,7 +19,9 @@ export default function SearchResult() {
function refresh() {
searchContainerRef.current?.replaceChildren();
if (!note?.searchResultsLoaded) {
if (note?.type !== "search") {
setState(undefined);
} else if (!note?.searchResultsLoaded) {
setState(SearchResultState.NOT_EXECUTED);
} else if (note.getChildNoteIds().length === 0) {
setState(SearchResultState.NO_RESULTS);
@@ -57,7 +59,7 @@ export default function SearchResult() {
<Alert type="info" className="search-no-results">{t("search_result.no_notes_found")}</Alert>
)}
<div ref={searchContainerRef} className="search-results" />
<div ref={searchContainerRef} className="search-result-widget-content" />
</div>
);
}