Skip to content

Commit a4b1953

Browse files
petermikitsherikras
authored andcommitted
[FieldArray] extend React.Component (#42)
* [FieldArray] extend React.Component * [FieldArray.test.js] fix unit test * [FieldArray.test.js] fix unit test * [FieldArray] fix unit test * [FieldArray] fix unit test
1 parent d5f945d commit a4b1953

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/FieldArray.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ type State = {
3131
state: ?FieldState
3232
}
3333

34-
class FieldArray extends React.PureComponent<Props, State> {
34+
class FieldArray extends React.Component<Props, State> {
3535
context: ReactContext
3636
props: Props
3737
state: State

src/FieldArray.test.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -246,9 +246,9 @@ describe('FieldArray', () => {
246246
renderArray.mock.calls[0][0].fields.push('c')
247247
await sleep(2)
248248

249-
expect(renderArray).toHaveBeenCalledTimes(2)
250-
expect(renderArray.mock.calls[1][0].meta.valid).toBe(false)
251-
expect(renderArray.mock.calls[1][0].meta.error).toBe('Too long')
249+
expect(renderArray).toHaveBeenCalledTimes(3)
250+
expect(renderArray.mock.calls[2][0].meta.valid).toBe(false)
251+
expect(renderArray.mock.calls[2][0].meta.error).toBe('Too long')
252252
})
253253

254254
it('should provide forEach', () => {

0 commit comments

Comments
 (0)