-
Notifications
You must be signed in to change notification settings - Fork 934
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added sortOrder option (deprecating sortDirection on columns object) #1310
Conversation
it seems to be a very good change.
var options = {
sortDirection: {
name: ${selectedColumn},
direction: ${direction}
}
}; me, too 👍 serverSide should change the option, right? Oh 😃 . already applied to the sample. but I think we should consider backward compatibility. Is this enough? |
@wdh2100 I think you're right, backward compatibility for something like this is a good idea. I've updated the PR to account for "sortDirection" if no sortOrder value is present. I also updated the field names. |
@patorjk you said earlier "It's makes it hard to implement multiple level sorting": can you confirm this is not yet implemented? |
Correct, it's not yet implemented. |
Didn't this disable sort by multiple columns? Now you can only sort by one column |
In the current API, the table's sort direction is held in one of the column options objects. This has the following problems:
This PR removes sortDirection from the column's object, and creates a "sortOrder" property on the options, examplet:
I may change columnName to "name" and sortDirection to "direction".