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.56k stars 267 forks source link

Incorrect token key received from "MultiInput" onTokenDelete event #5304

Closed manishcharsap closed 2 years ago

manishcharsap commented 2 years ago

Bug Description

getting incorrect key from "MultiInput" when click on delete icon.

Expected Behavior

ex : 1,2,3 (these are selected token) you select first token in list then click on third token delete icon. now what happening we are received first token key not third token key in onTokenDelete event.

Steps to Reproduce

ex : 1,2,3 (these are selected token) you select first token in list then click on third token delete icon. now what happening we are received first token key not third token key in onTokenDelete event.

Isolated Example

If possible, please provide an isolated example by forking CodeSandbox.

Context

Log Output / Stack Trace / Screenshots

{...}

Priority

The priority indicates the severity of the issue. To set the appropriate priority consider the following criteria:

Note: The priority might be re-evaluated by the issue processor.

Stakeholder Info (if applicable)

ilhan007 commented 2 years ago

Hello @SAP/ui5-webcomponents-topic-rl the issue is reproducible in the master. If you have several tokens and you select one, but press the "X" to delete another - the selected one gets removed, while the one you press the "X"of should be removed

https://user-images.githubusercontent.com/15702139/171369092-c7c9985f-c6e0-4931-8a9d-332e2eff8b82.mov

Neeeko commented 2 years ago

@ilhan007 @ivoplashkov, we're having a fairly similar issue with SuccessFactors, the only difference being it doesn't happen only when selecting an item, but when pressing directly the "x".

Screen Recording 2022-09-16 at 6 29 48 PM

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

Can you please let me know if this PR will fix this issue or if I should file another Issue? This is a critical defect for us. Thanks!