Hi!
I'm trying to set a different order for my data list, I use $this->crud->orderBy('my_field') in the controller, but it doesn't works. It seems Datatable, on JS side which doesn't understand the ordering.
You're totally right, DataTable was ordering the table by its first column by default. That's now disabled, starting with CRUD 3.1.43.
Cheers!
@tabacitu I think this is still an issue, unless I am not understanding.
select * from `events` where `events`.`deleted_at` is null order by `starts_at` asc
is the query generated by
$this->crud->orderBy('starts_at');
But the table is still sorted by the first column.
If you started your project before CRUD 3.1.43 and have published the CRUD views (mainly list.blade.php) you might need to do that again.
That should fix it for you. Cheers!
Ah shoot, you're right. Sorry about that.
Most helpful comment
You're totally right, DataTable was ordering the table by its first column by default. That's now disabled, starting with CRUD 3.1.43.
Cheers!