Pagination duplicates appearing across multiple pages

Having a bit of an issue with the table builder. I have some records, and I want my default sort to show ones which have a specific attribute set (it's a boolean), so I sort by that DESC so the true/1 values get placed first. The issue is that because many records share a true value, they can appear over multiple pages as by default the pagination just uses limit and offset, and my MySQL database doesn't know what it has returned on the previous page. Is there a good way of adding some extra levels of sorting in addition to the default sort / whatever the user has selected with multiple columns?
1 Reply
darrena092
darrena092OP2y ago
I guess potentially even a secondary sort by ID would probably solve the issue. Just not sure what the best thing to override is. Solved it by overriding InteractsWithTable::applySortingToTableQuery and adding a secondary sort by ID.
Want results from more Discord servers?
Add your server