SAP / ui5-webcomponents-react

A wrapper implementation for React of the UI5 Web Components that are compliant with the SAP Fiori User Experience
https://sap.github.io/ui5-webcomponents-react/
Apache License 2.0
437 stars 98 forks source link

[SF][SelectDialog]: Number of selected items is wrong. #2492

Closed QiuranHu closed 2 years ago

QiuranHu commented 2 years ago

Describe the bug In multi select mode of select dialog, the number of selected items is based on selected items in the current list, not based on totally selected items. To be specific, say the user first selects an item, then searches some text and selects another item. At this time, the number of totally selected items is 2, but 'Selected: 1' is displayed in the UI.

I think it might solve the problem if you provide a way to control the displayed number of selected items outside the select dialog component.

Also the number of selected items is not fixed on the top of the list. So, when the user scrolls down the list, he will not clearly see how many items he has selected already. The number of selected items should be fixed on the top of the list.

Isolated Example https://codesandbox.io/s/nifty-lumiere-0jr9w

To Reproduce Steps to reproduce the behavior:

  1. Open the codesandbox (https://codesandbox.io/s/nifty-lumiere-0jr9w).
  2. Click on 'Open dialog'.
  3. Click the checkbox before 'Item1'
  4. Input 'Text' in the search input and press enter.
  5. Click the checkbox before 'Text search item1'.
  6. The number of selected items should be 2 instead of 1.

Expected behavior The number of selected items should based on totally selected items, not based on selected items in the current list. The number of selected items should be fixed on the top of the list.

Screenshots image image image

UI5 Web Components for React Information @ui5/webcomponents version: 1.0.2 @ui5/webcomponents-react version: 0.20.5 Operating System: Linux Browser: Chrome Version 97.0.4692.71 (Official Build) (64-bit)

Additional context Organization: SAP SuccessFactors

Lukas742 commented 2 years ago

Hi @QiuranHu

I created a PR that should fix the first issue.

In the UX guidelines it's stated that the infobar should be scrollable and not sticky, that's why we decided to implement it that way. Since UI5 still implemented it fixed to the top, I contacted our UX experts to clarify what the expected behavior here is.

ui5-webcomponents-react-bot commented 2 years ago

:tada: This issue has been resolved in version v0.20.7 :tada:

The release is available on v0.20.7

Your semantic-release bot :package::rocket:

QiuranHu commented 2 years ago

Thank you for your swift action!