mirror of
https://github.com/nocobase/nocobase
synced 2024-11-15 12:26:22 +00:00
fix: field uiSchema is not updated
This commit is contained in:
parent
b9bbbc8516
commit
b06260d13d
@ -50,6 +50,18 @@ export class CollectionManagerPlugin extends Plugin {
|
||||
this.app.on('beforeStart', async () => {
|
||||
await this.app.db.getRepository<CollectionRepository>('collections').load();
|
||||
});
|
||||
|
||||
this.app.resourcer.use(async (ctx, next) => {
|
||||
const { resourceName, actionName } = ctx.action;
|
||||
if (resourceName === 'collections.fields' && actionName === 'update') {
|
||||
const { updateAssociationValues = [] } = ctx.action.params;
|
||||
updateAssociationValues.push('uiSchema');
|
||||
ctx.action.mergeParams({
|
||||
updateAssociationValues,
|
||||
});
|
||||
}
|
||||
await next();
|
||||
});
|
||||
}
|
||||
|
||||
async load() {
|
||||
|
Loading…
Reference in New Issue
Block a user