Changes to a list that would only result in orderBy clause difference do not trigger list refresh.
In chrome on the mac, mobl 0.45:
Consider a “most popular” list like this:
list(it in Item.all() where votes > 1 order by votes desc limit 30) { item { checkBox(it.selected, it.name) } }
If an existing list changes in such a way that the order by clause would result in a different order, but no items are added or removed, the list is not refreshed.
As soon as a new item qualifies for the ‘where clause’ the list is refreshed and the orders are corrected.To avoid too much spam in the way of refreshing for every property change of an item in a list, perhaps it’s best to just notify on properties mentioned in where clauses.
Implementing the suggestion from Chris M to work-around this problem was successful, e.g. I did this:
list(it in Item.all() where votes > 1 order by votes desc limit maxreturned) { item { checkBox(it.selected, it.name) } }
And whenever I modify the votes field on any item, I re-set maxreturned to 30. This results in a refresh of the list.
Submitted by Brian Hayward on 21 January 2013 at 18:17
Log in to post comments