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

Apply default sort order column and direction #313

Merged
merged 1 commit into from
Jun 6, 2021
Merged

Apply default sort order column and direction #313

merged 1 commit into from
Jun 6, 2021

Conversation

simple-hacker
Copy link
Contributor

Apply a default sort column and direction to the datatable.

Add the following to the datatable as properties. For example, to order by latest you should

public string $defaultSortColumn = 'created_at';
public string $defaultSortDirection = 'desc';

This order by will only apply if $defaultSortColumn is not empty, and no other column is being sorted. i.e. $this->sorts is empty.

@rappasoft rappasoft added the Awaiting Next Release Currently merged into development awaiting a release to master label Jun 6, 2021
@rappasoft rappasoft mentioned this pull request Jun 6, 2021
@rappasoft rappasoft merged commit 30becf2 into rappasoft:master Jun 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting Next Release Currently merged into development awaiting a release to master
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants