When the labels of 2 or more items in the list of the aui-autocomplete component are the same, the result of the onSelect handler will always be the first item, independently of which item is clicked.
The labels are the same because we use a custom template for the aui-selectable-list.
To Reproduce
Steps to reproduce the behavior:
Implement an aui-autocomplete with a custom template
Use the aui-autocomplete component to search for a string and make sure the result is a list where 2 or more items have the same label (but a different visual label in the custom template).
Select (click) the second item in the list.
The result of the onSelect handler is the first item.
Expected behavior
The result of the onSelect handler is the item we actually clicked.
Describe the bug
When the labels of 2 or more items in the list of the aui-autocomplete component are the same, the result of the onSelect handler will always be the first item, independently of which item is clicked. The labels are the same because we use a custom template for the aui-selectable-list.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The result of the onSelect handler is the item we actually clicked.
OS (please complete the following information):