-
-
Notifications
You must be signed in to change notification settings - Fork 120
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
Sorting on ManyToMany and Index view is possible #60
Comments
Yeah, it's possible when using multiple order columns. But providing that out of the box and documenting it so that people actually understand it is quite a challenge. ;) |
@Tarpsvo alright. I thought I just let you know in case you didn't. Maybe you can just link to this issue from the documentation somehow, so other ppl encountering this do have a clue on where to start with this. |
Added a reference to this issue in the docs. :) Thanks! |
The getSortability method above will cause the global search to break. I've solved that by adding an additional check:
|
The documentation states that
That's not entirely true. If you name the column name on the
PivotModel
different than on yourModel
where you want to sort in the index view (e.g. PivotModel column name:sort_order
, Model column name:order_column
) and then add the following method to your Nova ResourceDon't forget to change the
order_column_name
on your Model toorder_column
.The text was updated successfully, but these errors were encountered: