mirror of
https://gitee.com/nocobase/nocobase.git
synced 2024-12-04 13:18:55 +08: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