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.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;
|
ctx.body = data;
|
||||||
await next();
|
await next();
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user