ui5-webcomponents
ui5-webcomponents copied to clipboard
Incorrect token key received from "MultiInput" onTokenDelete event
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
- UI5 Web Components version: 0.22.4
- OS/Platform: Windows
- Browser: chrome
- Affected component: MultiInput
Log Output / Stack Trace / Screenshots
{...}
Priority
- [ ] Low
- [x] Medium
- [ ] High
- [ ] Very High
The priority indicates the severity of the issue. To set the appropriate priority consider the following criteria:
- Breaks entire application or system - High or Very High
- Accessibility issue - Medium or High
- Functional issue - Medium or High
- Visual issue - Low or Medium
Note: The priority might be re-evaluated by the issue processor.
Stakeholder Info (if applicable)
- Organization: {...}
- Business impact: {...}
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
@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".

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!