G’day mates,
So I’m hoping this is just a simple dumb thing I’ve missed, but I cannot for the life of me automate the sort order for a view of a table in WeWeb. I have a view of a table with two parameters setup, column name and sort order. The goal is when I click on the column header on the front end, it changes the column name to the clicked on column, and then will toggle between asc and desc.
So in the view, I have the parameters, and I have them hooked up to the sort function. The column name works perfectly. I can dynamically change that. However, I can’t get the sort order to trigger. The only way I’ve got that working is if Unbind it and manually change it. Now, I COULD set up two views one with sort order hard coded to desc and one to asc, and then switch between the views on the front end depending on which sort order is needed.
But obviously that’s not how it’s SUPPOSED to work.
I’ve tried text parameters, inputting asc, Asc, ASC. I’ve tried bools, I’ve even tried setting it as a number and 1, 0, -1. None of those work.
I can’t find any documentation that says what the sort function is supposed to take in to change it. It just says “choose the order” Views | Documentation
Or simply that you have a sort functionality per here: Supabase actions reference | Documentation
So I’m at a loss. If anyone can point out the hopefully super obvious step I’m missing, I’d greatly appreciate it.


