Ext.NET icon indicating copy to clipboard operation
Ext.NET copied to clipboard

Ext.data.TreeStore.filterNodes incorrectly keeps empty nodes in search results

Open fabriciomurta opened this issue 4 years ago • 1 comments

Found: 5.3.0 Ext.NET forums' thread: TreePanel filter empty container disappear by click

The Ext.NET's own tree filtering facility overridden in Ext.tree.Panel.filterBy() (ultimately calling Ext.data.TreeStore.filterNodes()) incorrectly keeps empty nodes shown even if they have no matching children in the tree.

This causes the node, if interacted with (expading/collapsing), to refresh and finally "vanish" from the tree, making a filtered tree unreliable.

The issue is bound to an Ext.NET specific feature but it seems to have been introduced due to Sencha's changes in API since at least Ext JS 6.

fabriciomurta avatar Jan 21 '22 20:01 fabriciomurta

For now, it looks like using store logic (as with Tree Panel > Advanced > Filters Example) and setting store's filterer: 'bottomup' does the same behavior old TreePanel logic filter did.

In the example linked above, adding this listener is enough to set the "store logic" to work as intended:

<Listeners>
    <AfterRender Handler="this.getStore().filterer = 'bottomup';" />
</Listeners>

fabriciomurta avatar Jan 21 '22 20:01 fabriciomurta