Chumper / Datatable

This is a laravel 4 package for the server and client side of datatables at http://datatables.net/
https://github.com/Chumper/Datatable
388 stars 153 forks source link

Here's hoping that this fixes the CollectionEngine! #309

Closed timgws closed 9 years ago

timgws commented 9 years ago

This should solve the problems that we have been seeing with the CollectionEngine!

As per #302, it looks like this solved the problem.

timgws commented 9 years ago

I have added a commit here to change doInternalOrder to remove the workingCollection->reverse() call when sorting by descending order.

Now, the order will be reversed using the sortByDesc function in place of the sortBy call that would normally be performed.

marsderp commented 9 years ago

Seems like a new error is occurring on line 246 $direction = $this->orderDirection[0];

Example output from $this->orderDirection is:

Array
(
    [8] => asc
)

Maybe we can use: $direction = array_values($this->orderDirection)[0];

timgws commented 9 years ago

@marsd, please try now!