Browse Source

fix: keep table and view order

Signed-off-by: Pranav C <pranavxc@gmail.com>
pull/852/head
Pranav C 3 years ago
parent
commit
84656d17e2
  1. 9
      packages/nocodb/src/lib/noco/gql/GqlApiBuilder.ts
  2. 9
      packages/nocodb/src/lib/noco/rest/RestApiBuilder.ts

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

@ -773,9 +773,12 @@ export class GqlApiBuilder extends BaseApiBuilder<Noco> implements XcMetaMgr {
tables.push(...relatedTableList.map(t => ({ tn: t })));
} else {
tables = (await this.sqlClient.tableList())?.data?.list?.filter(
({ tn }) => !IGNORE_TABLES.includes(tn)
);
tables = (await this.sqlClient.tableList())?.data?.list
?.filter(({ tn }) => !IGNORE_TABLES.includes(tn))
?.map(t => {
t.order = ++order;
return t;
});
// enable extra
tables.push(

9
packages/nocodb/src/lib/noco/rest/RestApiBuilder.ts

@ -405,9 +405,12 @@ export class RestApiBuilder extends BaseApiBuilder<Noco> {
}));
tables.push(...relatedTableList.map(t => ({ tn: t })));
} else {
tables = (await this.sqlClient.tableList())?.data?.list?.filter(
({ tn }) => !IGNORE_TABLES.includes(tn)
);
tables = (await this.sqlClient.tableList())?.data?.list
?.filter(({ tn }) => !IGNORE_TABLES.includes(tn))
?.map(t => {
t.order = ++order;
return t;
});
// enable extra
tables.push(

Loading…
Cancel
Save