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

[SelectField] Does not support readOnly property #6342

Closed
yanickrochon opened this issue Mar 14, 2017 · 1 comment
Closed

[SelectField] Does not support readOnly property #6342

yanickrochon opened this issue Mar 14, 2017 · 1 comment
Labels
component: select This is the name of the generic UI component, not the React module!

Comments

@yanickrochon
Copy link

Problem description

While implementing security features on a form and not allowing users to edit certain fields under certain circumstances (while still displaying the values), I came across the SelectField component unable to be set as read only.

Since the component is behaving like a TextField, it is missing this feature.

The desired behavior is that the menu would not open if the SelectField is read only.

Versions

  • Material-UI: 0.17.0
  • React: 15.4.2
  • Browser: Google Chrome latest
@Sharlaan
Copy link

Sharlaan commented Mar 15, 2017

You can try with the disabled prop, then modify the style to match a non-disabled TextField ?
but in this case, values from dropdown menu won't be displayed.

If you actually want the menu to display options, you can set MenuItems disabled prop in same way as above suggestion. This should deactivate the onItemTouchTap event if i'm not mistaken...

@oliviertassinari oliviertassinari changed the title SelectField does not support readOnly property [SelectField] Does not support readOnly property Mar 26, 2017
@oliviertassinari oliviertassinari added the component: select This is the name of the generic UI component, not the React module! label Mar 26, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: select This is the name of the generic UI component, not the React module!
Projects
None yet
Development

No branches or pull requests

3 participants