Skip to content

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