Skip to content

Commit

Permalink
Merge pull request #216 from NotFoundNL/fix/hide-drag-option-when-sor…
Browse files Browse the repository at this point in the history
…ting

fix: hide sort UI while sorting on a column value
  • Loading branch information
64knl authored Feb 29, 2024
2 parents c98f071 + 23075d1 commit a29bce9
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/Http/Controllers/Assets/TableOverviewController.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,11 @@ public function index(Request $request, Table $table)
$tableQueryService = new TableQueryService($table, $components);
$siteTableRowsPaginator = $tableQueryService->getSiteTableRows();

$layoutTable = new LayoutTable(create: $table->allow_create, delete: $table->allow_delete, sort: $table->allow_sort);
$layoutTable = new LayoutTable(
create: $table->allow_create,
delete: $table->allow_delete,
sort: ($request->sort ? false : $table->allow_sort)
);
$layoutTable->setTotalItems($siteTableRowsPaginator->total());

$tableService->setRequestParameters($request->query());
Expand Down

0 comments on commit a29bce9

Please sign in to comment.