Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom Input Components #16

Open
kingwill101 opened this issue Dec 18, 2019 · 1 comment
Open

Custom Input Components #16

kingwill101 opened this issue Dec 18, 2019 · 1 comment

Comments

@kingwill101
Copy link

redux-form allows the use of custom Input components like <Field component={CustomComponent} /> is there a way to do this with this library?

@merksam
Copy link
Collaborator

merksam commented Dec 18, 2019

@glenfordwilliams Hi! Yes, it's fully customizable! To make it possible you need to create context-form theme, where you can "teach" context-form for which field name which component should be used. We have MaterialUI integration example.

Please, take a look at MaterialUIExample.js. At line 47 you can see passing theme property with MaterialUITheme variable. It's imported from MaterialUITheme.js where integration with MaterialUI library is implemented. Take a look at the code, it contains answer for your questions.

Here is working Demo. Also, you can clone repository and play with it by yourself. Just open demo folder, then yarn install and yarn start.

Hope it's helpful, let me know if you have any other questions!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants