Hello,
I have a dataview generated bootstrap table, and now I am trying to make the column headers sortable.
It works when connecting the sort and dir to the server connect element.
But I thought by using a data view for the table it can be sorted without the nead to make another call to the databse through the server connect.
Then what is the benefit of the data view when sorting can only be done on the server connect?
I hope I can use the data view and only have to get all the records once and then order and sort them on the front end without the need of another database call.
I hope I made myself clear.
Can someone point me in the right direction?
Thanks!!
So, does it mean that when you want to be able to sort the table like this, there is no use for a data-view?
Is there somewhere a clear explanation/tutorial about data views and other data display components so I get a clear understanding over when to use what?
You can create a sortable table with the data view. In the Bootstrap Table Generator just choose the table source to be your data view and setup the sorting as you usually do with a regular db query.
The server action will refresh if you are using the sort/dir query params for it. Check if your server action has parameters and if these two query params are used as values there.