You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[Lens][Embeddable] Apply the correct references for filters (#204047)
## Summary
Fixes#180726
Fix the filter references when inline editing with the correct ones.
I've tried to reduce the fix to a minimal `extract` wrapper, but
unfortunately that is not possible due to some shared logic who rely on
the passed filters references and need to be injected.
So, why not injecting them and instead rely on the search context api?
Right now there's no difference, but formally the `api.filters$` is the
right place to get the latest version, and if in the future the `Edit
filters` flows would change, this api should be the go-to place to have
the right value.
Why not adding a FTR?
There's a bigger problem with the panel filters action who has a dynamic
`data-test-subj` value which is impossible to get right now. I would
rather prefer to fix that first and then add some tests in general for
multiple scenarios in Lens.
## Testing it locally
* Create a viz with a filter in the editor, save and return to dashboard
* Check the filters are shown correctly in the dashboard panel
* Edit inline and change the chart type. Apply changes
* Check the filters are shown correctly
* Now "edit" in the editor without changing anything
* Check the filter can be edited correctly (no empty popover) ✅ or 💥
* Save and return to dashboard
* Check the filters are shown correctly ✅ or 💥
0 commit comments