Skip to content

Commit

Permalink
SortControl: Re-populate the control in case a partial match is found
Browse files Browse the repository at this point in the history
fixes #186
  • Loading branch information
nilmerg committed Aug 11, 2023
1 parent 0051e6b commit 01760ef
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/Control/SortControl.php
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@ public function getSort(): ?string
// Choose sort string based on the first closest match
foreach (array_keys($columns) as $key) {
if (Str::startsWith($key, $sort)) {
$this->populate([$this->getSortParam() => $key]);
$sort = $key;

break;
Expand Down

0 comments on commit 01760ef

Please sign in to comment.