Limenius / liform-react

Generate forms from JSON Schema to use with React (& redux-form)
https://limenius.github.io/liform-react/
MIT License
174 stars 40 forks source link

ChoiceType expanded #12

Closed paulandrieux closed 6 years ago

paulandrieux commented 7 years ago

Hi,

I have defined a ChoiceType expanded in my Symfony form, but liform generates a select field instead of a collection of radio buttons. It seems that the ChoiceWidget.js cannot handle expanded option. Do anyone made a theme for this ?

github-mathieu-salles commented 7 years ago

I'm going through the same issue, did you find a theme or workaround ?

nacmartin commented 6 years ago

I am working on this. The widgets are done (working in a local branch), but it needs more work because in order to provide the initial values, there is no way to extract the correct format from formView. The direct approach just provides for a expanded multiple choice [a: true, b: false, c: true], instead of [a, c] that is what redux form would like and that makes more sense, data-wise. So the serializer of initial values must be smarter.

nacmartin commented 6 years ago

Ok, this is released in v0.9.0 of this library and v0.12.0 of https://github.com/Limenius/LiformBundle