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

Fixed an error was being raised as pointed at #12 even if one follow … #14

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

ivensrocha
Copy link

Fixed an error was being raised as pointed at #12 even if one follow the docs the docs:

Warning: Failed propType: Required prop `form` was not specified in `BootstrapForm`. Check the render method of `App`.

As far as I see the required of form is only used in order to guarantee it is used between a newforms.Form tag. But if you don`t pass it, an error is raised anyway:

Uncaught TypeError: Cannot read property `__patchedByBootstrapForm` of undefined

So I removed the mandatory form and made a validation inside render.

Feel free to refuse this fix since I`m not sure whether making form required has an important need that I was unaware of.

Ivens Rocha added 2 commits January 7, 2016 11:49
…llow the docs:

    Warning: Failed propType: Required prop `form` was not specified in `BootstrapForm`. Check the render method of `App`.

As far as I see the `required` of form is only used in order to guarantee it is used between a newforms.Form tag. But if you don`t pass it, an error is raised anyway:
   Uncaught TypeError: Cannot read property `__patchedByBootstrapForm` of undefined

So I removed the mandatory form and made a validation inside render.
…llow the docs:

    Warning: Failed propType: Required prop `form` was not specified in `BootstrapForm`. Check the render method of `App`.

As far as I see the `required` of form is only used in order to guarantee it is used between a newforms.Form tag. But if you don`t pass it, an error is raised anyway:
   Uncaught TypeError: Cannot read property `__patchedByBootstrapForm` of undefined

So I removed the the "required" form property on propTypes and made a validation inside render.
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

Successfully merging this pull request may close these issues.

1 participant