Skip to content

Commit da06686

Browse files
authored
v3.4.5 (#1836)
## [v3.4.5] - 2024-08-10 ### Bug Fixes - Fix sort queryString bug by @lrljoe in #1835
1 parent fb1cca0 commit da06686

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
All notable changes to `laravel-livewire-tables` will be documented in this file
44

5+
## [v3.4.5] - 2024-08-10
6+
### Bug Fixes
7+
- Fix sort queryString bug by @lrljoe in https://github.com/rappasoft/laravel-livewire-tables/pull/1835
8+
59
## [v3.4.4] - 2024-08-10
610
### New Features
711
- Boolean/Toggle Filter by @lrljoe in https://github.com/rappasoft/laravel-livewire-tables/pull/1830

src/Traits/Helpers/SortingHelpers.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,16 @@ public function getSingleSortingStatus(): bool
1919

2020
public function getSorts(): array
2121
{
22+
foreach ($this->sorts as $column => $direction) {
23+
if (is_array($direction)) {
24+
foreach ($direction as $colAppend => $actualDirection) {
25+
$this->sorts[$column.'.'.$colAppend] = $actualDirection;
26+
unset($this->sorts[$column]);
27+
}
28+
}
29+
30+
}
31+
2232
return $this->sorts;
2333
}
2434

0 commit comments

Comments
 (0)