Open mike-lloyd03 opened 1 year ago
I think the issue originates here where the selected index is determined from the string of the item that was chosen.
I'm not seeing an easy way to determine the index that is selected instead of the string itself.
Perhaps, as an added benefit to the user, duplicate items in the list can be determined and renamed as such? E.g. | item0 item1 item1 (Duplicate 1) item3 item4
Can have any N number of duplicates. This would generate unique names for each item in the list.
Perhaps, as an added benefit to the user, duplicate items in the list can be determined and renamed as such? E.g. | item0 item1 item1 (Duplicate 1) item3 item4
Can have any N number of duplicates. This would generate unique names for each item in the list.
This is of course assuming that any of the select menus can and should support duplicate entries. I can't really think of a reason that would be needed (how could the 2 similar selections actually result in different outcomes?), so the simple solution would be to always return a set of only unique entries in the items list.
If a slice with duplicate values is passed to the
items()
method on a newFuzzySelect
, the index of the first item is returned if the user selects the second item.Selecting the first item returns the correct index.
Selecting the second item returns the incorrect index.