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

EuiSuperSelect's options prop isn't marked as required in docs #1911

Closed
chandlerprall opened this issue May 2, 2019 · 1 comment · Fixed by #1975
Closed

EuiSuperSelect's options prop isn't marked as required in docs #1911

chandlerprall opened this issue May 2, 2019 · 1 comment · Fixed by #1975
Assignees
Labels

Comments

@chandlerprall
Copy link
Contributor

EuiSuperSelect's options prop has isRequired, but react-docgen doesn't appear to notice that when generating documentation.

@thompsongl
Copy link
Contributor

Looks like if you provide a defaultProp value, react-docgen will mark said prop as not required1 . Which...is arguably correct, and regardless brings up a better point about the EuiSuperSelect component definition.

We should remove the defaultProp value for options ([]) as it still results in a TypeError2 and that TypeError is less helpful than the failed prop type warning from React.

[1] reactjs/react-docgen#321 (comment)
[2] TypeError: Cannot read property 'inputDisplay' of undefined

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

Successfully merging a pull request may close this issue.

2 participants