We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b0fe11f commit 5ade59bCopy full SHA for 5ade59b
src/ProTableEdit/index.tsx
@@ -118,10 +118,7 @@ export default function ProTableEdit<T = any>(props: ProTableEditProps<T>) {
118
}, [open]);
119
useEffect(() => {
120
if (open) {
121
- // 由于modal是出于摧毁状态此时表单还未出现dom创建所以需要加入延时队列 让open先粗发表单创建
122
- setTimeout(() => {
123
- formRef?.current?.setFieldsValue({ ...initData });
124
- }, 0);
+ formRef?.current?.setFieldsValue({ ...initData });
125
}
126
}, [initData?.[String(initDataKey)], initData, open]);
127
@@ -344,6 +341,7 @@ export default function ProTableEdit<T = any>(props: ProTableEditProps<T>) {
344
341
open={open}
345
342
onCancel={handleCancel}
346
343
destroyOnClose
+ forceRender
347
footer={[
348
<Button
349
key="reset"
0 commit comments