Skip to content

Commit e7a320c

Browse files
committed
fix(dashboard): should exclude visibleInViewIDs when downloading a filter’s schema
1 parent 004bcf4 commit e7a320c

File tree

1 file changed

+3
-3
lines changed
  • dashboard/src/model/render-model/dashboard/content/filters

1 file changed

+3
-3
lines changed

dashboard/src/model/render-model/dashboard/content/filters/filters.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,16 +73,16 @@ export const FiltersRenderModel = types
7373
return self.values[key];
7474
},
7575

76-
getSchema(ids: string[]) {
76+
getSchema(ids: string[], raw?: boolean) {
7777
const filters = self.findByIDSet(new Set(ids));
7878

7979
const ret = {
80-
filters: filters.map((f) => f.json),
80+
filters: filters.map((f) => ({ ...f.json, visibleInViewsIDs: raw ? f.json.visibleInViewsIDs : [] })),
8181
};
8282
return ret;
8383
},
8484
downloadSchema(ids: string[]) {
85-
const schema = JSON.stringify(this.getSchema(ids), null, 2);
85+
const schema = JSON.stringify(this.getSchema(ids, false), null, 2);
8686
const filename = 'Filters';
8787
downloadJSON(filename, schema);
8888
},

0 commit comments

Comments
 (0)