charlypoly / react-apollo-form

Build React forms based on GraphQL APIs.
MIT License
199 stars 15 forks source link

Issue with theming #36

Closed fridaystreet closed 5 years ago

fridaystreet commented 5 years ago

Hi,

This library looks great, I'm a keen follower of any work in the space using schemas to automate code. I see you're rewriting a new version, but doesn't seem to be much doco there yet. In the meantime thought I'd try this version on a small survey form project I have.

All good, managed to get things up and running with the default theme, but when I tried to put in the theme from the theme doco in your wiki, I get the following error when I type anything in the field. Apologies if this is more react-jsonschema related, but any hints would be greatly appreciated.

index.js:1375 Warning: A component is changing an uncontrolled input of type text to be controlled. Input elements should not switch from uncontrolled to controlled (or vice versa). Decide between using a controlled or uncontrolled input element for the lifetime of the component. More info: https://fb.me/react-controlled-components in input (created by Input) in div (created by Input) in Input (at ApplicationForm.js:31) in StringField (created by SchemaField) in div (created by FormField) in FormField (at ApplicationForm.js:14) in FieldTemplate (created by SchemaField) in SchemaField (created by ObjectField) in div (at ApplicationForm.js:23) in ObjectFieldTemplate (created by ObjectField) in ObjectField (created by SchemaField) in div (created by FormField) in FormField (at ApplicationForm.js:14) in FieldTemplate (created by SchemaField) in SchemaField (created by ObjectField) in div (at ApplicationForm.js:23) in ObjectFieldTemplate (created by ObjectField) in ObjectField (created by SchemaField) in div (created by FormField) in FormField (at ApplicationForm.js:14) in FieldTemplate (created by SchemaField) in SchemaField (created by Form) in form (created by Form) in Form (created by FormRenderer) in FormRenderer (created by ApolloForm) in div (created by ApolloForm) in ApolloForm (at App.js:39) in div (at App.js:38) in App (at src/index.js:8)

Cheers Paul

charlypoly commented 5 years ago

Hi @fridaystreet,

If you just getting started with react-apollo-form, I highly advise you to take a look to the new version: https://frontier-forms.dev

You will find all the needed documentation with a way simpler API than the one exposed by react-apollo-form, especially regarding theming.

Unfortunately, no patch will be developed on react-apollo-form in the future. However, a migration guide will be soon provided for users using react-apollo-form.

Thanks for you comprehension.