field-form
field-form copied to clipboard
fix: field value updates may fail multiple times
fix https://github.com/react-component/field-form/issues/753
// Field input
props.onChange?.('');
props.onChange?.('A');
// Test
expect(form.getFieldValue('input')).toBe('A');
// Result
expect(received).toBe(expected)
Expected: "A"
Received: ""
Summary by CodeRabbit
- 测试
- 新增了针对表单字段多次快速变更值的测试用例,确保多次连续变更后最终值能正确反映在表单状态中。
- 移除了未使用的测试文件导入内容。