SAP / ui5-webcomponents

UI5 Web Components - the enterprise-flavored sugar on top of native APIs! Build SAP Fiori user interfaces with the technology of your choice.
https://sap.github.io/ui5-webcomponents/
Apache License 2.0
1.55k stars 266 forks source link

ViewSettingDialog: strange reset behavior when replacing SortItems #7939

Open Lukas742 opened 11 months ago

Lukas742 commented 11 months ago

Bug Description

This is a followup issue to this issue, please take a look at it if you need more context.

After opening the ViewSettings dialog and then replacing SortItems, the "Reset" button is disabled, only when you e.g. change the sort order it's enabled. If you then press the "Reset" button the SortItems are reset to the initially mounted SortItems, but if you select one of them the updated SortItems are displayed again.

Also, how would one be able to update the component to show only the updated SortItems? E.g. if the data changed when a user switches a view. Is this only possible by re-mounting the component?

Here you can find the original comments describing these issues: comment 1, comment 2

Affected Component

ViewSettingDialog, SortItem

Expected Behaviour

No response

Isolated Example

https://codesandbox.io/s/ui5-webcomponents-forked-6l2mkn?file=/src/index.js

Steps to Reproduce

  1. Got to codeSandbox
  2. Open dialog by clicking on the "open" button
  3. See that SortItems 1-3 are displayed
  4. Close the dialog and click on update
  5. See that now SortItems 4-6 are displayed and the "Reset" button is disabled
  6. Select one of the updated items
  7. Click on "Reset" inside the dialog
  8. See that again SortItems 1-3 are displayed
  9. Select on one of the SortItems
  10. See that now SortItems 4-6 are displayed again

Log Output, Stack Trace or Screenshots

No response

Priority

None

UI5 Web Components Version

1.19.1

Browser

Chrome, Edge, Firefox, Safari

Operating System

No response

Additional Context

No response

Organization

No response

Declaration

ilhan007 commented 11 months ago

Hello @SAP/ui5-webcomponents-topic-b this belongs to you and it's a follow-up of older issue

lateefsofi commented 9 months ago

What is the status of this issue, we expect fix to be available before release?

lateefsofi commented 9 months ago

@Lukas742 I don't see any update on this, how we can push it forward on priority. It will hit one of SuccessFactors deliverable

tsanislavgatev commented 9 months ago

Hello, Sorry for late response, we will have a look at this issue and will discuss the default behaviour.