So I am using the Angular tree component defined here https://angular2-tree.readme.io/docs
I am trying to have a breadcrumbs path on search for single results from the root.
So searching something like “test” would yield results like the following, where ‘>’ represents a new root.
> A1 / A2
test
> B1 / B2 / B3
test
> C3
test
My idea is to hide all the subparents that are not the test
leaf, but still have the leaf visible. I would also simply change the name of the root node to simulate breadcrumbs.
Is that possible to hide all the subparents except the final leaf, if so how would I do that?
Another possible idea I had was to move the final leaf node into the children of the root node, and do the same with the simulated breadcrumbs path. Although I am not sure how to restore the trees original structure upon clearing search.