gcanti / tcomb-form

Forms library for react
https://gcanti.github.io/tcomb-form
MIT License
1.16k stars 136 forks source link

Removed refs management fix #407

Closed gbiryukov closed 6 years ago

gbiryukov commented 6 years ago

406 introduced issue with refs management 😢

when form model changes and some refs should be removed, it set value null to corresponding refs keys. Original react string refs removes ref key completely from registry in such cases.

It causes issues in some edge cases, like validation of such updated form (because struct uses hasOwnProperty to determine is ref available).

This PR restores original string refs behaviour with new callback refs.

gcanti commented 6 years ago

Thanks @gbiryukov, released a patch

gbiryukov commented 6 years ago

thanks @gcanti 🎉