collection json view

This commit is contained in:
Jan Prochazka
2021-04-05 11:15:59 +02:00
parent ff52430e1e
commit 554be51546
10 changed files with 195 additions and 18 deletions

View File

@@ -294,6 +294,20 @@ export abstract class GridDisplay {
this.reload();
}
showFilter(uniqueName) {
this.setConfig(cfg => {
if (!cfg.filters.uniqueName)
return {
...cfg,
filters: {
..._.omitBy(cfg.filters, v => !v),
[uniqueName]: '',
},
};
return cfg;
});
}
removeFilter(uniqueName) {
this.setConfig(cfg => ({
...cfg,
@@ -547,4 +561,11 @@ export abstract class GridDisplay {
formViewKeyRequested: null,
}));
}
switchToJsonView() {
this.setConfig(cfg => ({
...cfg,
isJsonView: true,
}));
}
}