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

Form.Label htmlFor default value needs to be removed #27

Closed
DimitarChristoff opened this issue May 11, 2018 · 1 comment · Fixed by #30
Closed

Form.Label htmlFor default value needs to be removed #27

DimitarChristoff opened this issue May 11, 2018 · 1 comment · Fixed by #30

Comments

@DimitarChristoff
Copy link
Contributor

https://github.com/couds/react-bulma-components/blob/master/src/components/form/components/label.js#L19

the problem is in this:

<Form.Label>
  Foo
  <Form.Input name='foo' />
</Form.Label>

this produces <label class="label" for> ... which means clicking on the Foo text does not give focus to the input. workaround is <Form.Label htmlFor={null}> but it's not nice.

happy to send a PR updating it and also adding the case to the storybook.

@couds
Copy link
Owner

couds commented May 11, 2018

Hi @DimitarChristoff, Thanks for using this library PR are more than welcome please open one to fix this behavior

DimitarChristoff added a commit to DimitarChristoff/react-bulma-components that referenced this issue May 14, 2018
DimitarChristoff added a commit to DimitarChristoff/react-bulma-components that referenced this issue May 14, 2018
…put without an explicit htmlFor. fixes couds#27"

This reverts commit e6030c5.
@couds couds closed this as completed in dd0126c May 15, 2018
couds pushed a commit that referenced this issue May 15, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants