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

Can this library be used without react-jsonschema-vis #4

Open
loganpowell opened this issue Jul 20, 2017 · 5 comments
Open

Can this library be used without react-jsonschema-vis #4

loganpowell opened this issue Jul 20, 2017 · 5 comments

Comments

@loganpowell
Copy link

I think this is what I'm looking for. I'm having difficulties wrapping reactstrap with redux-form or vice versa to get the styles from reactstrap to work with redux-form.

My question: If I don't want to predefine my schema, but still want to use this libarary, is that possible? If so, how? If not, I'm still not sure how to use it... any plans on building out the docs?

@nikordaris
Copy link
Owner

Thanks for your interest in this library. In theory you could use this without react-jsonschema-vis but you'd have to pass in some attributes as a "schema" object to the component. The input components require a field schema object to get attributes like title, description, etc. in order to render the input field. I wouldn't recommend using this without react-jsonschema-vis. I think it will cause more headaches than it saves you.

I had issues getting reactstrap to use my inline style object to override their styles. I think there is a bug. I was able to override it with css (in my case Jss). I think your best option is to use the code here as examples on how to use reactstrap with redux-form. If you have a specific issue with the integration, post your question on stackoverflow and link it here and I can see if I can answer it for you.

Good luck!

@nikordaris
Copy link
Owner

I would start InputField.js#L63 then follow the rabbit hole to InputField.js#L11 and finally to FormField.js#L14

If you are new to redux-form then I would start with their extensive documentation, Getting Started with Redux-Form

@patvdleer
Copy link

I'm looking for the exact same thing, is a crazy idea to say split up the packages? One that wraps the redux-form elements in reactstrap and another one (on top of that) applying the json schemes?

@nikordaris
Copy link
Owner

@patvdleer I'm definitely not against this. The standard input fields are straight forward enough that a library that combined redux-form and reactstrap wouldn't buy devs much and it would lock them in to a third party library that would need to be maintained to keep up with redux-form and reactstrap changes. The select and modal components would definitely make it useful but is going to take some work to refactor it to separate the json schema parsing from the component rendering. I think from a code design perspective that is the right thing to do. I'm just not sure I will have time to do it right now. I will review a pull request though!

@patvdleer
Copy link

Thanks for the quick and clear response, since I don't have a good take on the amount of work (let alone maintenance) I merely suggested it. I'll look into making a gist instead of an entire library.

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

3 participants