Skip to content

Commit

Permalink
Merge pull request #2481 from gredimano/patch-1
Browse files Browse the repository at this point in the history
Disable ordering via orderColumn.
  • Loading branch information
yajra authored Oct 31, 2020
2 parents fe3994b + 794ef95 commit cfac1b4
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/QueryDataTable.php
Original file line number Diff line number Diff line change
Expand Up @@ -671,11 +671,15 @@ protected function hasOrderColumn($column)
* Apply orderColumn custom query.
*
* @param string $column
* @param array $orderable
* @param array $orderable
*/
protected function applyOrderColumn($column, $orderable)
{
$sql = $this->columnDef['order'][$column]['sql'];
if ($sql === false) {
return;
}

if (is_callable($sql)) {
call_user_func($sql, $this->query, $orderable['direction']);
} else {
Expand Down

0 comments on commit cfac1b4

Please sign in to comment.