fix: action open mode

This commit is contained in:
chenos 2022-04-30 14:26:57 +08:00
parent 36e0b0a988
commit c1128bf150
2 changed files with 3 additions and 2 deletions

View File

@ -65,7 +65,7 @@ export const ActionDesigner = (props) => {
{ label: t('Drawer'), value: 'drawer' },
{ label: t('Dialog'), value: 'modal' },
]}
value={field.componentProps.openMode}
value={fieldSchema?.['x-component-props']?.['openMode']}
onChange={(value) => {
field.componentProps.openMode = value;
fieldSchema['x-component-props']['openMode'] = value;

View File

@ -69,7 +69,7 @@ export const Action: ComposedAction = observer((props: any) => {
const {
popover,
confirm,
openMode,
// openMode,
containerRefKey,
component,
useAction = useA,
@ -85,6 +85,7 @@ export const Action: ComposedAction = observer((props: any) => {
const { run } = useAction();
const fieldSchema = useFieldSchema();
const designerProps = fieldSchema['x-designer-props'];
const openMode = fieldSchema?.['x-component-props']?.['openMode'];
const renderButton = () => (
<SortableItem
{...others}