Filter Bar: Selected items not cleared after change in Adapt Filters dialog
Describe the bug
After a change of a filter value in the Adapt Filters dialog, clearing the filter bar doesn't result in previously selected filter items being removed.
Clear works fine unless the filter values are changed via Adapt Filters dialog.
Isolated Example
https://stackblitz.com/edit/github-rc93m5-rtmizd?file=src%2FFilterBarView.tsx
Reproduction steps
- Click on Adapt Filters button
- Click on Show Values button
- Select Option 1 for Filter 1
- Select Option 1 for Filter 2
- Click on OK button
- Click on Clear button
Expected Behaviour
Both filters are cleared -> all selected options are removed from the filter components.
Screenshots or Videos
No response
UI5 Web Components for React Version
1.26.1
UI5 Web Components Version
1.23.1
Browser
Chrome
Operating System
No response
Additional Context
No response
Relevant log output
No response
Organization
No response
Declaration
- [X] I’m not disclosing any internal or sensitive information.
Hello,
Is there any plan to investigate this issue or are there any updates when this will be worked on?
Thank you.
Hi @marekviskup
I investigated this issue already and unfortunately it turned out to be more complex than anticipated. We'll probably need a new concept for the FilterBar in general as our current approach isn't really how one would implement this component in React. We'll probably discuss the possible options next week and I'll let you know when there's an update.
Hi @marekviskup
quick update: Internally we're currently copying properties of the input elements, which is leading to this error you're describing. Unfortunately, this is not only leading to problems, but is also hard to maintain, since we have to adjust this implementation every time the (internal) implementation of a UI5 web component changes. Because of this, we've decided to drop this functionality with our v2.0 release, but we will also add a prop that makes it possible to disable this behavior for our 1.x version.
Hi @marekviskup
the linked PR will fix this issue, but only for v2. We're planning to release a stable v2 version later this month. Do you also need this fix for v1? If so, we'll need to create a dedicated fix for the v1 version of this component, as we had to completely overhaul it for v2 to implement the new concept, which unfortunately can't be downported to v1.
:tada: This issue has been resolved in version v2.0.0-rc.3 :tada:
The release is available on v2.0.0-rc.3
Your semantic-release bot :package::rocket: