Allow disabling of columns orderable to play nice with sortable_columns #74
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Take an example, there is a table with 6 columns. The first 4 columns are searchable/orderable, as is the 6th. The 5th column displayed on the table is just a link, or some other data that doesn't need ordered. So there are 5 orderable columns and 6 columns displayed.
If one makes the 5th column not orderable through the DataTables API - https://datatables.net/reference/option/columns.orderable
EX:
Then when clicking on the 6th column to order it, it tries to find the 6th orderable column, but there is none, so it generates a faulty query.
This PR remedies this by identify from the params which columns have not had their ordering shut off with the DataTables API and uses that to correctly identify which column the user is trying to sort by.