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

feat(FormField): pass required to the control #917

Merged
merged 1 commit into from
Nov 22, 2016

Conversation

levithomason
Copy link
Member

@levithomason levithomason commented Nov 22, 2016

Fixes #911

This PR updates the FormField to pass the required prop to the control component.

<Form.Field control='input' required />
//=> has child: <input required>

<Form.Input required />
//=> has child: <Input required />
//=> has child: <input required />

@levithomason levithomason merged commit 0551527 into master Nov 22, 2016
@levithomason levithomason deleted the fix/form-field-required branch November 22, 2016 19:46
@levithomason
Copy link
Member Author

Released in semantic-ui-react@0.61.3.

Arthelon pushed a commit to Arthelon/Semantic-UI-React that referenced this pull request Nov 23, 2016
@su6838354
Copy link

when the component is select/dropdown, it may not effective.

@levithomason
Copy link
Member Author

Correct, there is no required prop for a Dropdown (nor Select). There is no DOM node for the browser to "require" a value from. The Dropdown is constructed from HTML and CSS.

You should instead use form validation, #407.

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.

2 participants