Skip to content

Commit

Permalink
Fix: Server-side processing with SQL Server would give an error when …
Browse files Browse the repository at this point in the history
…entering into the neutral sort (i.e. third click of a column header
  • Loading branch information
AllanJard committed May 29, 2024
1 parent ef7a9cf commit f725ab4
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Editor.php
Original file line number Diff line number Diff line change
Expand Up @@ -1669,6 +1669,13 @@ private function _ssp_sort($query, $http)
);
}
}

// Paging makes little sense without an ordering clause, so if there is
// no order to apply (possible in DT2 on the third click of a header)
// we apply the primary key as the ordering value.
if (! isset($http['order']) || count($http['order']) === 0) {
$query->order($this->_pkey[0] . ' asc');
}
}

private function _constructSearchBuilderConditions($query, $data)
Expand Down

0 comments on commit f725ab4

Please sign in to comment.