filterService's updateFilters doesn't work with tree data
See original GitHub issueI’m submitting a Bug report
Your Environment
Software | Version(s) |
---|---|
Angular | 8.1.1 |
Angular-Slickgrid | 2.20.1 |
TypeScript | 3.5.3 |
Describe the Bug
Hello, I have a custom HTML form that uses filterService.updateFilters
on columns with Filters.multipleSelect
, but since I set enableTreeData: true
in the grid configuration, it doesn’t work anymore - oddly it works fine using the header row built-in filter.
Steps to Reproduce
As described above, manually update the filters using the FilterService with a multipleSelect kind of filter, works just fine until I enabled TreeData in the grid configuration.
Expected Behavior
filterService.updateFilters
should work as the header row built-in filter does.
Current Behavior
The updated filters doesn’t seem to apply on the grid data.
Possible Solution
I’ve noticed that the DOM filter relies on callbackSearchEvent
.
Forcing triggerOnSearchChangeEvent
on updateFilters
(e.g. updateFilters(filters, true, true, true)
) so that it calls callbackSearchEvent
too fixes the issue.
So it might have to do with the way Slickgrid is notified from the filter change?
updateFilters
uses this.emitFilterChanged(emitterType);
while triggerOnSearchChangeEvent
directly uses this._onSearchChange.notify
.
Thanks a lot!
Code Sample
Issue Analytics
- State:
- Created 2 years ago
- Comments:20 (12 by maintainers)
Top GitHub Comments
It took me longer than I expected but the new version is now out and there’s a few other features as well, so go check it out. Take a look at the new version 2.29.x
Cheers ⭐
no plans, the
addItem
has aposition
option for top/bottom but that’s all and that is always enough for me. You have 2 ways to deal with thispositionIndex
that could be an extra option to theaddItem