gcanti / tcomb-form

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

Radio component does not have a transformer #226

Closed tamagokun closed 8 years ago

tamagokun commented 8 years ago

This only appears to be an issue in IE10 through some cross-browser testing i've been doing.

I can't mount a Radio button field as the Component's getTransformer method returns undefined.

I believe adding a transformer to the Radio class would fix this.

tamagokun commented 8 years ago

Under further investigation:

It appears that IE10 is unable to see the default transformer that is in Component. Class inheritance must not be working right.

tamagokun commented 8 years ago

https://babeljs.io/docs/advanced/caveats/

IE10 does not support __proto__ that would make sense. I'm not sure if you want to achieve IE10 support or not, feel free to just close this issue out.

gcanti commented 8 years ago

Hi! Thanks for digging into this. From what I understand there are two solutions:

  1. adding the default static transformer to the Radio component
  2. using the optional spec.protoToAssign babel transformer https://babeljs.io/docs/advanced/transformers/spec/proto-to-assign

I'd go for 1), what do you think?

tamagokun commented 8 years ago

I'd prefer 1. It's cleaner that way I think.

gcanti commented 8 years ago

Released in v0.6.8 and v0.7.4