From 9b0a52dbaa0daabbe873a0cf4c289d128ce18b2f Mon Sep 17 00:00:00 2001 From: Daniel Werner Date: Thu, 14 Mar 2024 19:19:31 +0100 Subject: [PATCH 1/3] Remove default order when sorting --- src/DataGrid/DataSources/QueryDataSource.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/DataGrid/DataSources/QueryDataSource.php b/src/DataGrid/DataSources/QueryDataSource.php index 52ad56d..7bba206 100644 --- a/src/DataGrid/DataSources/QueryDataSource.php +++ b/src/DataGrid/DataSources/QueryDataSource.php @@ -32,6 +32,9 @@ public function search(?string $search, array $columns): void public function sort(?array $orders, ?array $dirs): void { + // Remove existing, default ordering + $this->query->reorder(); + collect($orders)->each(fn ($field, $index) => $this->query->orderBy($field, $dirs[$index] ?? 'asc')); } From 21a644d7d3af8ea1ea574829315e216a571aa0aa Mon Sep 17 00:00:00 2001 From: Daniel Werner Date: Thu, 14 Mar 2024 19:25:11 +0100 Subject: [PATCH 2/3] Update .rmt.yml --- .rmt.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.rmt.yml b/.rmt.yml index 87f878b..5322500 100644 --- a/.rmt.yml +++ b/.rmt.yml @@ -26,7 +26,9 @@ _default: # BRANCH SPECIFIC CONFIG # On master, we override the general config master: - version-generator: semantic # More complex versionning (semantic) + version-generator: + semantic: + allow-label: true version-persister: vcs-tag: tag-prefix: '' # No more prefix for tags @@ -37,4 +39,4 @@ master: exclude-merge-commits: true composer-update: name: composer.json - vcs-commit: ~ # Commit the CHANGELOG \ No newline at end of file + vcs-commit: ~ # Commit the CHANGELOG From 5f76153a37125fb6262e3a2d05a2ca7d959074e7 Mon Sep 17 00:00:00 2001 From: Daniel Werner Date: Thu, 14 Mar 2024 19:25:39 +0100 Subject: [PATCH 3/3] Release of new version 0.6.1-beta --- CHANGELOG | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG b/CHANGELOG index 27c47f0..b24fad8 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -3,6 +3,8 @@ VERSION 0 INITIAL RELEASE ========================== Version 0.6 - Rendering with Inertia and Vue3 - Alpha release! + 14/03/2024 18:25 0.6.1-beta Clear default order when sorting + 21a644d Update .rmt.yml 14/11/2023 13:45 0.6.0-alpha Alpha release 383ec5c Add inertia components b92d9e9 Fix the search @@ -60,4 +62,4 @@ VERSION 0 INITIAL RELEASE 8146a66 Add test badge Version 0.1 - Initial release - 23/03/2021 19:22 0.1.0 initial release + 23/03/2021 19:22 0.1.0 initial release \ No newline at end of file