From 737aa11fc5b97264ae593d0c462197cf8e036f6b Mon Sep 17 00:00:00 2001 From: Katherine Date: Thu, 17 Oct 2024 11:34:32 +0800 Subject: [PATCH] fix: allow table column title to be reset to default (#5439) --- .../data-blocks/table/tableColumnSettings.tsx | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/packages/core/client/src/modules/blocks/data-blocks/table/tableColumnSettings.tsx b/packages/core/client/src/modules/blocks/data-blocks/table/tableColumnSettings.tsx index d6b01c61d2..6e08363070 100644 --- a/packages/core/client/src/modules/blocks/data-blocks/table/tableColumnSettings.tsx +++ b/packages/core/client/src/modules/blocks/data-blocks/table/tableColumnSettings.tsx @@ -66,16 +66,15 @@ export const tableColumnSettings = new SchemaSettings({ }, } as ISchema, onSubmit: ({ title }) => { - if (title) { - field.title = title; - columnSchema.title = title; - dn.emit('patch', { - schema: { - 'x-uid': columnSchema['x-uid'], - title: columnSchema.title, - }, - }); - } + field.title = title; + columnSchema.title = title; + dn.emit('patch', { + schema: { + 'x-uid': columnSchema['x-uid'], + title: columnSchema.title, + }, + }); + dn.refresh(); }, };