Native Mobile - toggle sort order of a list

Hi all Brief summary: we’re developing a use case (small incident management app) that shows a list of incidents, sorted by date (latest first). The end-user keeps requesting for a simple toggle-button, so that they can quickly sort the list of incidents (List view) from latest first to earliest first. As such, that’s a valid request and isn’t that hard to develop, a toggle that keeps track of the sort order state and refreshing the page should do the trick. Indeed, it does the trick. But reloading the page doesn’t look so smoothly in Native Mobile, the end-user notices it and wants it gone. I was wondering if any of you have encountered this before and have a more neat solution for this? Thank you for your thoughts on this matter!
1 answers

Hi Leander,

You could use a non-persistent ‘helper’ entity with the toggle attribute as a wrapper around the list view and add an on change event to the toggle, simply refreshing only the helper entity (in combination with  a datasource nanoflow to retrieve the list items (which takes into account the selected toggle for sorting)). That way, you don’t need to show the page again, but you only need to refresh the list via that helper entity. Hope this helps.