re-enable/fix sortable tablelisting flag

Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
Michael Kaufmann
2023-01-08 17:25:19 +01:00
parent d69a7eeb07
commit d42072e3ad
2 changed files with 4 additions and 4 deletions

View File

@@ -113,17 +113,15 @@ class Collection
public function withPagination(array $columns, array $default_sorting = []): Collection
{
// Get only searchable columns
/*
$sortableColumns = [];
foreach ($columns as $key => $column) {
if (isset($column['sortable']) && $column['sortable']) {
if (!isset($column['sortable']) || (isset($column['sortable']) && $column['sortable'])) {
$sortableColumns[$key] = $column;
}
}
*/
// Prepare pagination
$this->pagination = new Pagination($columns, $this->count(), (int)Settings::Get('panel.paging'), $default_sorting);
$this->pagination = new Pagination($sortableColumns, $this->count(), (int)Settings::Get('panel.paging'), $default_sorting);
$this->params = array_merge($this->params, $this->pagination->getApiCommandParams());
return $this;