-
Notifications
You must be signed in to change notification settings - Fork 271
Re-sort listview after some change #1016
Comments
TornadoFX has a |
I figured it out but this gives no results https://edvin.gitbooks.io/tornadofx-guide/?q=SortedFilteredList. Which guide are you referring too? |
sos!? |
Looks like that info hasn't been moved to the guide yet, so it's in the Wiki still: |
It is still not clear how to trigger re-sorting when some event happened |
Not sure what you mean. The page I linked to states "You can force a refilter by calling the |
My listview has list of items which checkboxes. I want to show un-checked items on the top of the view and checked at the bottom. When use selects-unselects checkbox I want list to be re-sorted so item moves to a proper area. I am not sure refilter() will do it. |
sos |
Seems like you just want to sort the table based on the boolean field the checkbox is bound to, is that it? |
Yes exactly. It is a simple task list where I want to sort items based on it's status(open/done). So every time the task is mark as done I want to re-sort list so it goes down |
bump |
I've updated the |
This example works with tableview, is there way to make it work with listview? |
Looking at the code I see that comparator in SortedFilteredList is not set: |
I think the pull request is not necessary. When I create SortedFilteredList I can add my comparator like this |
The follow up question is if there is a way to animate addition/deletion/resorting/refiltering items. As of now UI changes too quickly. It would be better if modifications to listview were more visible so user can see what is going on |
No, I don't think ListView has any built in animation capabilities. It's pretty easy to set the comparator, but we could sure make it more convenient. I'll look at your PR and see if that's the way to go or not :) |
How can I re-sort elements of ListView after some event occurred( e.g. checkbox is selected)?
Is there a manual that describes how to apply filtering and sorting?
The text was updated successfully, but these errors were encountered: