mirror of
https://github.com/nocobase/nocobase
synced 2024-11-15 11:26:55 +00:00
fix: auto get filter fields
This commit is contained in:
parent
330d08ab35
commit
2aa04323ff
@ -384,6 +384,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