fix: allow table column title to be reset to default (#5439)

This commit is contained in:
Katherine 2024-10-17 11:34:32 +08:00 committed by GitHub
parent 88b8782d11
commit 737aa11fc5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -66,16 +66,15 @@ export const tableColumnSettings = new SchemaSettings({
}, },
} as ISchema, } as ISchema,
onSubmit: ({ title }) => { onSubmit: ({ title }) => {
if (title) { field.title = title;
field.title = title; columnSchema.title = title;
columnSchema.title = title; dn.emit('patch', {
dn.emit('patch', { schema: {
schema: { 'x-uid': columnSchema['x-uid'],
'x-uid': columnSchema['x-uid'], title: columnSchema.title,
title: columnSchema.title, },
}, });
});
}
dn.refresh(); dn.refresh();
}, },
}; };