Skip to content

Commit

Permalink
fix(@uform/react): fix array field render bug
Browse files Browse the repository at this point in the history
  • Loading branch information
janryWang committed Mar 7, 2019
1 parent 0b7ba2a commit 5023536
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions packages/react/src/shared/array.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react'
import { isFn, getIn, camelCase } from '../utils'
import { isFn, getIn, camelCase, isEqual } from '../utils'

export const createArrayField = options => {
const {
Expand Down Expand Up @@ -246,8 +246,10 @@ export const createArrayField = options => {
}
}

componentDidUpdate() {
this.validate()
componentDidUpdate(prevProps) {
if (!isEqual(prevProps.value, this.props.value)) {
this.validate()
}
}

componentDidMount() {
Expand Down

0 comments on commit 5023536

Please sign in to comment.