Skip to content
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

Custom default sort direction #200

Closed
wants to merge 4 commits into from
Closed

Conversation

ezra-obiwale
Copy link

@ezra-obiwale ezra-obiwale commented May 20, 2022

Ensures overriding the direction in the query parameter works as expected.

@sortablelink('column', 'columnTitle', ['direction' => 'desc'])

@Darthmaul
Copy link

Hello - I would really love to see this PR implemented. I just got a request from a user to implement this functionality and this PR would resolve. Thanks for your work!

@robbielove
Copy link

This is already possible by passing direction as an associative array to the third parameter:

$columnSpecificData['name'] = ['direction' => 'desc'];

@sortablelink('name', 'Name', $columnSpecificData['name'])

$columnSpecificData['other'] = ['direction' => 'asc'];

@sortablelink('other', 'Other', $columnSpecificData['other'])

@ezra-obiwale
Copy link
Author

@robbielove I tested it as you mentioned above however, the direction was still being overridden by the determined direction.

I've updated this PR to fix that.

@robbielove
Copy link

yeah sorry it's in other PR's

see #188 #194

@ezra-obiwale
Copy link
Author

Cool. Shutting this down then.

Could you maybe see about merging one of those PRs? Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants