From 4d6e3ff796b2b884474da67104bcacf55c46b861 Mon Sep 17 00:00:00 2001 From: Ramesh Mane <101566080+rameshmane7218@users.noreply.github.com> Date: Fri, 21 Jun 2024 15:23:46 +0530 Subject: [PATCH] fix(nocodb): display value column order in new view (#8808) --- packages/nocodb/src/models/View.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/nocodb/src/models/View.ts b/packages/nocodb/src/models/View.ts index 37d7499089..ac8606e099 100644 --- a/packages/nocodb/src/models/View.ts +++ b/packages/nocodb/src/models/View.ts @@ -1809,6 +1809,11 @@ export default class View implements ViewType { defaultOrder ); }); + } else if (!copyFromView) { + // sort by display value first, then other columns + columns.sort((a, b) => { + return +b.pv - +a.pv; + }); } let order = 1;