From aff76b2d857939c12dfd1af40d3439afa79950c4 Mon Sep 17 00:00:00 2001 From: chenos Date: Tue, 9 Nov 2021 12:59:28 +0800 Subject: [PATCH] fix: refresh the page after updating the popup type --- packages/client/src/schemas/table/index.tsx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/packages/client/src/schemas/table/index.tsx b/packages/client/src/schemas/table/index.tsx index 2bea265b5..8cf1c418e 100644 --- a/packages/client/src/schemas/table/index.tsx +++ b/packages/client/src/schemas/table/index.tsx @@ -1959,11 +1959,12 @@ Table.Action.DesignableBar = () => { size={'small'} defaultValue={popupComponent} style={{ width: 100 }} - onChange={(value) => { + onChange={async (value) => { const s = Object.values(schema.properties).shift(); s['x-component'] = value; refresh(); - updateSchema(s); + await updateSchema(s); + window.location.reload(); // const f = field.query(getSchemaPath(s)).take() // console.log('fffffff', { schema, f }); }} @@ -1974,7 +1975,7 @@ Table.Action.DesignableBar = () => { Drawer - + Window @@ -1983,7 +1984,7 @@ Table.Action.DesignableBar = () => { )} {!inActionBar && ( - {t('Trigger on click the table row')}    + {t('Triggered when the row is clicked')}    )}