Browse Source

refactor: maintain alphabetic order of view/table list

Signed-off-by: Pranav C <pranavxc@gmail.com>
pull/914/head
Pranav C 3 years ago
parent
commit
49e6ab3c3c
  1. 3
      packages/nocodb/src/lib/noco/gql/GqlApiBuilder.ts

3
packages/nocodb/src/lib/noco/gql/GqlApiBuilder.ts

@ -782,6 +782,9 @@ export class GqlApiBuilder extends BaseApiBuilder<Noco> implements XcMetaMgr {
// enable extra
tables.push(
...(await this.sqlClient.viewList())?.data?.list
?.sort((a, b) =>
(a.view_name || a.tn).localeCompare(b.view_name || b.tn)
)
?.map(v => {
this.viewsCount++;
v.type = 'view';

Loading…
Cancel
Save