Skip to content

Commit

Permalink
Merge branch 'develop' into update-concept-tree-node-styles
Browse files Browse the repository at this point in the history
  • Loading branch information
Kadrian authored Sep 6, 2024
2 parents 5d0faf9 + e871d72 commit cba386c
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions frontend/src/js/concept-trees/ConceptTreeFolder.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import ConceptTree from "./ConceptTree";
import ConceptTreeNodeTextContainer from "./ConceptTreeNodeTextContainer";
import { getConceptById } from "./globalTreeStoreHelper";
import type { SearchT, TreesT } from "./reducer";
import { isNodeInSearchResult } from "./selectors";

const Root = styled("div")`
font-size: ${({ theme }) => theme.font.sm};
Expand Down Expand Up @@ -57,6 +58,12 @@ const ConceptTreeFolder: FC<PropsT> = ({
openInitially,
});

if (!search.showMismatches) {
const shouldRender = isNodeInSearchResult(conceptId, search, tree.children);

if (!shouldRender) return null;
}

const matchingEntries =
!tree.children || !tree.matchingEntries
? null
Expand Down

0 comments on commit cba386c

Please sign in to comment.