react-final-form-arrays icon indicating copy to clipboard operation
react-final-form-arrays copied to clipboard

isEqual returns true by default

Open MakaryHryshkin opened this issue 6 years ago • 3 comments

image

@erikras This function is used to determine whether the fields are pristine or not, so if we have initial values and current form values - [] and [{...},{...}], it shows that the values are pristine. Could you please clarify the reason why it returns true in case of no callback is provided? I think it would be better to write it in the docs because it's quite confusing, I have expected it working this way - 'return this.props.a === this.props.b' by default instead of returning true when the custom callback is not provided, thanks!. '

MakaryHryshkin avatar Feb 06 '19 15:02 MakaryHryshkin

I am also curious why it returns true in case of no callback is provided ? I have been writing my own to calculate a pristine. Not very interesting.

HawiCaesar avatar Feb 13 '19 17:02 HawiCaesar

@erikras Could you please reference https://github.com/final-form/react-final-form-arrays/releases/tag/v3.0.0 to this issue as that release fixes it?

MakaryHryshkin avatar Aug 28 '19 17:08 MakaryHryshkin

No example, how the new function should work, what is expected, etc.... need to rollback to 2.0.3 so my code did not breaks... so pitty

ivaylopetrovdev avatar Sep 03 '19 12:09 ivaylopetrovdev