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

Allows reordering when column is sorted #180

Open
JshGrn opened this issue Sep 8, 2023 · 1 comment
Open

Allows reordering when column is sorted #180

JshGrn opened this issue Sep 8, 2023 · 1 comment

Comments

@JshGrn
Copy link

JshGrn commented Sep 8, 2023

Very basic install nothing additional. When clicking sort column and then reordering it works, however if you sort and then refresh it says its disabled. Latest install of Laravel + Nova + Spatie Sortable + nova-sortable (fresh project)

@lukakhin
Copy link

do this in your resource

public static function canSort(NovaRequest $request, $resource): bool
    {
        return empty($request->input('orderBy'));
    }

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

No branches or pull requests

2 participants