Tree: Allow filterBy
to be a getter
#6374
Labels
Type: Enhancement
Issue contains an enhancement related to a specific component. Additional functionality has been add
Milestone
Describe the bug
As described in https://github.com/orgs/primefaces/discussions/2659, the
<Tree>
can already support a getter for thefilterBy
prop, as long as you work around the fact that.split()
is called on it first. If we remove that assumption, we can get lazy lookups for filtering.PR: #6367
Use case
My tree data has multiple labels in multiple languages. Depending on other reactive state, I might prefer some of the labels over the others. I'm already templating the tree rows myself, so now I want to control the best label for filtering. I don't want to recompute the whole tree when the other reactive state changes. I just want to control the filtering behavior with a getter.
Reproducer
https://stackblitz.com/edit/tree-filter-by-getter
PrimeVue version
4.0.1
Vue version
4.x
Language
TypeScript
Build / Runtime
TypeScript
Browser(s)
No response
Steps to reproduce the behavior
See attached fiddle. I'm using
getterWrapped
when I'd like to just usegetter
.Expected behavior
No response
The text was updated successfully, but these errors were encountered: