This is an automated email from the ASF dual-hosted git repository.

msyavuz pushed a commit to branch enxdev/refactor/migrate-table-to-antd5
in repository https://gitbox.apache.org/repos/asf/superset.git


The following commit(s) were added to 
refs/heads/enxdev/refactor/migrate-table-to-antd5 by this push:
     new 453bc02358 fix: sorting on hooks
453bc02358 is described below

commit 453bc02358c9254cba07ac0c6af4a98b43db41a7
Author: Mehmet Salih Yavuz <[email protected]>
AuthorDate: Mon Mar 24 19:39:35 2025 +0300

    fix: sorting on hooks
---
 superset-frontend/src/views/CRUD/hooks.ts | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/superset-frontend/src/views/CRUD/hooks.ts 
b/superset-frontend/src/views/CRUD/hooks.ts
index 16c4d591f6..a082bd971a 100644
--- a/superset-frontend/src/views/CRUD/hooks.ts
+++ b/superset-frontend/src/views/CRUD/hooks.ts
@@ -158,8 +158,8 @@ export function useListViewResource<D extends object = any>(
         }));
 
       const queryParams = rison.encode_uri({
-        ...(sortBy[0]?.id ? { order_column: sortBy[0].id } : {}),
-        ...(sortBy[0]?.desc ? { order_direction: 'desc' } : {}),
+        order_column: sortBy[0].id,
+        order_direction: sortBy[0].desc ? 'desc' : 'asc',
         page: pageIndex,
         page_size: pageSize,
         ...(filterExps.length ? { filters: filterExps } : {}),

Reply via email to