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

Warning when using select with options < 2 #147

Closed
jpuri opened this issue Jul 24, 2015 · 2 comments
Closed

Warning when using select with options < 2 #147

jpuri opened this issue Jul 24, 2015 · 2 comments

Comments

@jpuri
Copy link
Collaborator

jpuri commented Jul 24, 2015

When I use belle select with number of options < 2 I get this warning in browser console:

'Warning: Failed propType: Invalid undefined children of type object supplied to Belle Select, expected an array. Check the render method of SelectDocumentation.'

Its coz of Line 633, select.jsx:
const error = React.PropTypes.arrayOf(optionOrPlaceholderOrSeparatorPropType).isRequired(props, propName, componentName);

We need to get rid of this arrayOf.

@jpuri
Copy link
Collaborator Author

jpuri commented Jul 25, 2015

Another small related issue: if there is no placeholder(which is not highly probable) and no option then select gets broken on the page as

for placeholder or option is missing.

@jpuri jpuri assigned jpuri and unassigned jpuri Jul 25, 2015
@jpuri
Copy link
Collaborator Author

jpuri commented Aug 7, 2015

This has been fixed with PR #148.

@jpuri jpuri closed this as completed Aug 7, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant