Queue has a very nice feature for letter users manage their filters, but I don’t see a way to let them manage the sort order. Clearly I can change the sort order of the model itself, and can even do so from a JS, but I don’t see a good way to create a UI for the user to select the sort order.
In my case, we have two somewhat complex sort orders on our queue. We would like the user to be able to toggle between those sort orders. I did try using a Template above the queue with a custom tag in the template and JS to manage the model, but the layout isn’t very usable - the ends up above the queue area making it confusing for users. And I don’t see a way to include a template or a button or any control besides a filter on the queue itself.
The best answer I’ve come up with, which is a total hack, is to create a bogus filter (one that doesn’t actually change the results) and then attach to the control using jQuery to get the events and manage the model sort order that way. Making this approach even more challenging is that filters don’t have the ability to set custom IDs on them - so it’s difficult to reliably attach to it.
Any recommendations on how to make this happen? Would you recommend I continue down the “fake filter” route, and maybe find a better way to locate the control in the DOM (any recommendations? maybe some other method in the Skuid object model can locate it for me?) Or should I just use JS and insert a custom control directly into the DOM at the place I want (which I’ve had challenges with in the past, as when Skuid updates the page it drops all my custom DOM changes on the refresh, but in theory with sufficient event listening I may be able to correct for this).
Thanks! (and yes, this is also an “Idea” for the future - custom sorts on a queue and other controls!)