Skip to content

Commit

Permalink
fix: property path set to "false" used as sortable path instead of fa…
Browse files Browse the repository at this point in the history
…lling back to the column name
  • Loading branch information
Kreyu committed Jul 7, 2023
1 parent 34525b3 commit 8a65f84
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/DataTable.php
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ public function sort(SortingData $data): void
}

if ($sortField === true) {
$sortField = $column->getOptions()['property_path'] ?? $column->getName();
$sortField = $column->getOptions()['property_path'] ?: $column->getName();
}

$sortingDataFiltered->addColumn($column->getName(), SortingColumnData::fromArray([
Expand Down

0 comments on commit 8a65f84

Please sign in to comment.