过去多啦不再A梦2017-05-16 12:04:05
Similar to paging, I want to bind a click event to each filter area. When clicked, the field to be filtered will be obtained. Then you can get the desc or asc style of the area, and then return to the background order, return data, and display the data
迷茫2017-05-16 12:04:05
I happened to see this case while reading "The Definitive Guide to JavaScript" this morning. I took a photo and shared it with you
Finally just submit the return value to the server
I also made a table sorting requirement last month. I used the AngularJS plug-in ui-grid to do it, which is very convenient
世界只因有你2017-05-16 12:04:05
1. If the amount of data is large and paging is required, pass the field names and sorting methods to be sorted to the backend;
2. The amount of data is small, no paging is needed, or front-end paging can be used, and sorting can be achieved through js.
巴扎黑2017-05-16 12:04:05
Can be sorted directly on the front end, such as the Bootstrap Datatable plug-in.