-
New Feature
-
Resolution: Done
-
Normal
-
9.0.1.2
-
None
-
Security Level: Jimmy
-
None
-
None
Use case
- a listbox is sorted by sort="auto(language)" by clicking a listheader
- After adding a new item into ListModel, how to force ListModel to sort again?
Current Result
1. call Listheader.sort() , but this is not MVVM way
2. ListModelList.sort(Comparator<E> cmpr, final boolean ascending) requires 2 parameters but app developers can't get the existing comparator and sorting order
Proposed solution
Check attached SortedListModelList
1. a sort() method that sorts the ListModel with the previous comparator and sorting order
2. in add(), insert the newly-add item into the proper position instead of sorting the whole list after insertion to keep the whole list sorted in the same way.