You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sorry in advance, I'm not really sure if it's a feature request or if I don't know how to achieve it with the bundle.
I'm trying to sort by default with multiple fields.
As you can see, you're able to sort by multiple fields. Using the example above, if two entities have the same title, EasyAdmin sort the entities by date.
I think this feature could be very useful in the paginate() method.
Maybe by merging the 'defaultSortFieldName' & 'defaultSortDirection' parameters ?
Thanks
The text was updated successfully, but these errors were encountered:
The filter/sorting functionality only offers some basic features.
For any advanced needs, you should implement your logic and use the paginator only to paginate
Support Question
Sorry in advance, I'm not really sure if it's a feature request or if I don't know how to achieve it with the bundle.
I'm trying to sort by default with multiple fields.
With the EasyAdmin bundle you're able to achieve what I'm looking for with the setDefaultSort() method :
https://symfony.com/bundles/EasyAdminBundle/4.x/crud.html#search-order-and-pagination-options
->setDefaultSort(['title' => 'ASC', 'startsAt' => 'DESC'])
As you can see, you're able to sort by multiple fields. Using the example above, if two entities have the same title, EasyAdmin sort the entities by date.
I think this feature could be very useful in the paginate() method.
Maybe by merging the 'defaultSortFieldName' & 'defaultSortDirection' parameters ?
Thanks
The text was updated successfully, but these errors were encountered: