When I search for a node name, I need the search to be activated on every input the user keys in. While GTree implements in the handler of onkeydown, I was hoping the "JSCheckIfEnter" condition was not present. For me just the "FilterTreeAction" action inside the onkeydown handler is enough.
Will the GTree team implement this feature? If yes, when can I expect a release?
Hi Rupali,
I've just uploaded a new version of GTree, that allows you to specify whether pressing Enter is needed or not for filtering. You can also set the minimum number of characters before filtering is active (e.g. to avoid filtering after a single character in a large tree, which would be very slow). I hope this helps your use case!
For now, I am just using a workaround to stimulate a click after ever type (using keyup event) on the search input. But it will be better if this control is provided by the component itself
Its good temporary approach. But if the data is huge, we cannot trigger the search on every key down which will cause the performance issue.
Actually, its better if the team can provide the option that we can turn on/off to let it auto trigger or not
Note that it's easy to modify GTree to behave like this. I've added two attributes to the FilterSettings structure, FilterAfterEnterOnly (default True) and FilterMinimumCharacters (default 3), and changed the logic in Input_NodeNameOnKeydown to check for FilterAfterEnterOnly false in case no Enter has been pressed, and for FilterMinimumCharacters to see if the number of characters has been reached before we filter.
EDIT: That didn't quite work, so I've now added een OnChange that does the filtering if Enter is not pressed.
I've requested to join the GTree team, so I my changes above can be incorporated.