ui5-webcomponents-react icon indicating copy to clipboard operation
ui5-webcomponents-react copied to clipboard

Filter Bar: Selected items not cleared after change in Adapt Filters dialog

Open marekviskup opened this issue 1 year ago • 3 comments

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

  1. Click on Adapt Filters button
  2. Click on Show Values button
  3. Select Option 1 for Filter 1
  4. Select Option 1 for Filter 2
  5. Click on OK button
  6. 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.

marekviskup avatar Apr 02 '24 09:04 marekviskup

Hello,

Is there any plan to investigate this issue or are there any updates when this will be worked on?

Thank you.

marekviskup avatar Jun 05 '24 08:06 marekviskup

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.

Lukas742 avatar Jun 06 '24 06:06 Lukas742

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.

Lukas742 avatar Jun 19 '24 08:06 Lukas742

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.

Lukas742 avatar Aug 16 '24 14:08 Lukas742

: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: