So I have a table that shows users order information. Depending on what department they are in they might have thousands of orders open at one time which really slows down the tables function. I have filters that can be applied to the data and was handling that on the front end but it was very slow with large sets of data. I've since changed the way those filters work to where they run on the database and deliver the information prefiltered to the users. I also only send them 100 rows at a time and set up custom pagination to pull the next 100 rows from the database when they click the next page. This is all working great but one of my users brought up a good point about sorting that I didn't think about. When they use the built in sort function on the tables headers it only sorts the 100 rows loaded in. I'm looking to send a message to the page when someone clicks the column header so I know they want to filter that column and then have the database handle that like I do with the filters but I don't know how to send a message when they click the table headers.
Any help would be greatly appreciated!