Skip to content

Commit 6069f21

Browse files
author
昔梦
committed
fix:修复全屏时formrender下拉框等内容没有挂载到画布上
1 parent f99f975 commit 6069f21

File tree

3 files changed

+12
-0
lines changed

3 files changed

+12
-0
lines changed

docs/xflow/demo/custom-flow/fullCase/components/customWidget.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,9 @@ const CustomWidget = forwardRef<
103103
// size="small"
104104
removeHiddenData={false}
105105
widgets={{ ReadOnlyPanel }}
106+
configProvider={{
107+
getPopupContainer: triggerNode => triggerNode.parentElement
108+
}}
106109
/>
107110
</div>
108111
);

docs/xflow/demo/custom-flow/fullCase/components/secondTagWidget.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,9 @@ const secondTagWidget = forwardRef<
121121
}}
122122
// size="small"
123123
widgets={{ ReadOnlyPanel }}
124+
configProvider={{ // 全屏时挂载到父节点
125+
getPopupContainer: triggerNode => triggerNode.parentElement
126+
}}
124127
/>
125128
</div>
126129
);

packages/x-flow/src/components/NodeEditor/index.tsx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,9 @@ const NodeEditor: FC<INodeEditorProps> = forwardRef((props, ref: any) => {
164164
const initialValues = form.getValues();
165165
handleNodeValueChange(initialValues);
166166
}}
167+
configProvider={{
168+
getPopupContainer: triggerNode => triggerNode.parentElement
169+
}}
167170
/>
168171
);
169172
} else if (
@@ -178,6 +181,9 @@ const NodeEditor: FC<INodeEditorProps> = forwardRef((props, ref: any) => {
178181
watch={watch}
179182
size={'small'}
180183
readOnly={readOnly}
184+
configProvider={{
185+
getPopupContainer: triggerNode => triggerNode.parentElement
186+
}}
181187
/>
182188
);
183189
} else if (CustomSettingWidget) {

0 commit comments

Comments
 (0)