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 }))); tables.push(...relatedTableList.map(t => ({ tn: t })));
} else { } else {
tables = (await this.sqlClient.tableList())?.data?.list?.filter( tables = (await this.sqlClient.tableList())?.data?.list
({ tn }) => !IGNORE_TABLES.includes(tn) ?.filter(({ tn }) => !IGNORE_TABLES.includes(tn))
); ?.map(t => {
t.order = ++order;
return t;
});
// enable extra // enable extra
tables.push( 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 }))); tables.push(...relatedTableList.map(t => ({ tn: t })));
} else { } else {
tables = (await this.sqlClient.tableList())?.data?.list?.filter( tables = (await this.sqlClient.tableList())?.data?.list
({ tn }) => !IGNORE_TABLES.includes(tn) ?.filter(({ tn }) => !IGNORE_TABLES.includes(tn))
); ?.map(t => {
t.order = ++order;
return t;
});
// enable extra // enable extra
tables.push( tables.push(

Loading…
Cancel
Save