fix: refresh the page after updating the popup type

This commit is contained in:
chenos 2021-11-09 12:59:28 +08:00
parent 1056a4dbe8
commit aff76b2d85

View File

@ -1959,11 +1959,12 @@ Table.Action.DesignableBar = () => {
size={'small'} size={'small'}
defaultValue={popupComponent} defaultValue={popupComponent}
style={{ width: 100 }} style={{ width: 100 }}
onChange={(value) => { onChange={async (value) => {
const s = Object.values(schema.properties).shift(); const s = Object.values(schema.properties).shift();
s['x-component'] = value; s['x-component'] = value;
refresh(); refresh();
updateSchema(s); await updateSchema(s);
window.location.reload();
// const f = field.query(getSchemaPath(s)).take() // const f = field.query(getSchemaPath(s)).take()
// console.log('fffffff', { schema, f }); // console.log('fffffff', { schema, f });
}} }}
@ -1974,7 +1975,7 @@ Table.Action.DesignableBar = () => {
<Select.Option value={'Action.Drawer'}> <Select.Option value={'Action.Drawer'}>
Drawer Drawer
</Select.Option> </Select.Option>
<Select.Option value={'Action.Window'}> <Select.Option disabled value={'Action.Window'}>
Window Window
</Select.Option> </Select.Option>
</Select> </Select>
@ -1983,7 +1984,7 @@ Table.Action.DesignableBar = () => {
)} )}
{!inActionBar && ( {!inActionBar && (
<Menu.Item> <Menu.Item>
{t('Trigger on click the table row')} &nbsp;&nbsp; {t('Triggered when the row is clicked')} &nbsp;&nbsp;
<Switch size={'small'} defaultChecked /> <Switch size={'small'} defaultChecked />
</Menu.Item> </Menu.Item>
)} )}