mirror of
https://github.com/nocobase/nocobase
synced 2024-11-15 09:38:51 +00:00
fix: auto get filter fields
This commit is contained in:
parent
330d08ab35
commit
2aa04323ff
@ -383,6 +383,15 @@ export const getInfo = async (ctx: actions.Context, next) => {
|
||||
});
|
||||
data.groupField = groupField;
|
||||
}
|
||||
|
||||
data.actions = data.actions.map(action => {
|
||||
if (action.type === 'filter') {
|
||||
if (!action.fields) {
|
||||
action.fields = data.fields.filter(({filterable}) => filterable);
|
||||
}
|
||||
}
|
||||
return action;
|
||||
});
|
||||
|
||||
ctx.body = data;
|
||||
await next();
|
||||
|
Loading…
Reference in New Issue
Block a user