diff --git a/packages/table/src/components/EditableTable/index.tsx b/packages/table/src/components/EditableTable/index.tsx index 8079fd614b1e..57ba4ecfbe73 100644 --- a/packages/table/src/components/EditableTable/index.tsx +++ b/packages/table/src/components/EditableTable/index.tsx @@ -293,7 +293,7 @@ function EditableTable< }, } as EditableFormInstance; }, - [props.name], + [props.name, formRef.current], ); useEffect(() => { diff --git a/tests/table/editor-table-two.test.tsx b/tests/table/editor-table-two.test.tsx index 50164afc2bec..a45709ccd299 100644 --- a/tests/table/editor-table-two.test.tsx +++ b/tests/table/editor-table-two.test.tsx @@ -620,6 +620,8 @@ describe('EditorProTable 2', () => { await waitFor(() => { return wrapper.findByDisplayValue('动态设置的title' + i); }); + + expect(formRef.current?.getFieldValue('table').length).toEqual(2); }); it('📝 EditableProTable ensures that xxxProps are functions also executed', async () => {