shoebox
shoebox copied to clipboard
How to get the OrderedViewSet from Shoebox<T>?
In an example I can see that we can get the OrderedViewSet by grouping the items in some way. What if I would like to display all the lists? I can't find any way to do renderEach on the lists Shoebox.
Shoebox could use a better way to do this, but for now something like this should work (I haven't tested this code):
val lists = Shoebox<List>(dir.resolve("lists"))
val allLists = lists.view("allLists", {true})
.orderedSet(true, compareBy(List::uid))
renderEach(allLists) { list ->
// ...
}
This would not work well if there were a large number of lists, but then that would be an issue regardless.