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

fix(Form): Disable Form.Select open dropdown in onfocus event #1115

Closed
jmanuel1609 opened this issue Jan 4, 2017 · 4 comments
Closed

fix(Form): Disable Form.Select open dropdown in onfocus event #1115

jmanuel1609 opened this issue Jan 4, 2017 · 4 comments

Comments

@jmanuel1609
Copy link

Steps to Reproduce

  1. disable Form.Select component
  2. go to Name field.
  3. Press tab to go to Gender field
  4. the component is disabled but still open the dropdown

Expected
The Form should do this

Result
The Form does not do this

Testcase
If the docs show the issue, use: http://react.semantic-ui.com/collections/form
Otherwise, fork this to get started: http://codepen.io/levithomason/pen/ZpBaJX

@levithomason
Copy link
Member

levithomason commented Jan 4, 2017

This is is an issue with the Form.Field, same as the previous issue with the required prop. It should pass thedisabled prop along to the component but it is instead disabling the form field and consuming the disabled prop.

image

We need to pass the disabled prop along. Fixed The catch here is that a disabled component has different styling. They are made partially transparent (opacity: 0.45 by default). If both the field and the control are disabled then there is double the opacity applied, once on the field, and again on the control. We'll need to ensure only one component has the disabled style, preferably the field.

@jmanuel1609
Copy link
Author

thanks for your response. What about readonly property? is only working in Form.Input

@levithomason
Copy link
Member

A Field cannot be readOnly so it does not consume the prop and is therefore always passed to the control.

@levithomason
Copy link
Member

PR coming.

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

2 participants