Fit.UI icon indicating copy to clipboard operation
Fit.UI copied to clipboard

DropDown: Value() and GetSelections() return items in incorrect order

Open FlowIT-JIT opened this issue 5 years ago • 1 comments

DropDown allows the user to change the order of selected items using drag and drop. However, Value() and GetSelections() does not reflect the correct order anymore. The bug was introduced with commit c8559b99f8db381d66b8fc1b1d8ff7c0b8463ec9 (performance optimizations).

FlowIT-JIT avatar Jan 15 '20 08:01 FlowIT-JIT

Reopening bug report. The problem has not been fully resolved.

Assume we have a DropDown like this: [ Item 1 , Item 2 , Item 3 | V ]

If we select a new item - Item 0 - in front of Item 1, then Value() and GetSelections() is expected to return: Item 0, Item 1, Item 2, Item 3. But unfortunately they return Item 1, Item 2, Item 3, Item 0.

This problem becomes very obvious when we use React or similar where control values are stored in state and components re-rendered, in which case control might be updated with items in incorrect order.

Jemt avatar Jan 26 '23 21:01 Jemt