-
Notifications
You must be signed in to change notification settings - Fork 8.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Filtering on a search cell first inclusive then exclusive gives bad results - #39802 #41754
Filtering on a search cell first inclusive then exclusive gives bad results - #39802 #41754
Conversation
Pinging @elastic/kibana-app-arch |
src/legacy/core_plugins/data/public/filter/filter_manager/filter_manager.ts
Outdated
Show resolved
Hide resolved
💚 Build Succeeded |
💔 Build Failed |
The changes in this PR essentially are:
|
💚 Build Succeeded |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm. Pulled down and tested prior to the last push, bug was fixed. Like this version better with no invertFilters
fn. 🎉
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
code LGTM
…esults - elastic#39802 (elastic#41754) * Resolves elastic#39802 * Fixed tests that didn't detect the bug * Don't expose filter manager's filters, but a copy. * getPartitionedFilters to use getFilters (for clone) * Adjust filter gen tests to invert filters now calling addFilters * remove invertFilter method
…esults - elastic#39802 (elastic#41754) * Resolves elastic#39802 * Fixed tests that didn't detect the bug * Don't expose filter manager's filters, but a copy. * getPartitionedFilters to use getFilters (for clone) * Adjust filter gen tests to invert filters now calling addFilters * remove invertFilter method
Summary
Resolves
#39802
#41762
The problem was happening due to
FilterManager
exposing it's internalfilters
array.When a filter was manipulated, it was updated in
FilterManager
directly, without detecting changes and triggering UI updates.Now
FilterManager
returns a clone of the filters array, and if a filter is changed,setFilters
oraddFilters
must be called to reflect the changes.I also updated the test that didn't detect the problem and 2 other tests that has the same issue.
Checklist
Use
strikethroughsto remove checklist items you don't feel are applicable to this PR.For maintainers