You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I create TextField element with disabled={true} attribute, but without onChange, I receive warning: Warning: Failed prop type: You provided a `value` prop to the TextField without a `onChange` handler. This will render a read only field. Set either the `onChange` or use the `defaultValue` instead.
If component is disabled, then there is no sense to define onChange, because its read only field by definition.
The text was updated successfully, but these errors were encountered:
The controlled prop validation will now ignore the disabled prop as
well. So the validation will not fail if the readOnly or disabled props
are enabled on a component.
Closes#432
mlaursen
changed the title
Warning in TextField if disabled=true and no onChange is provided
[TextField] - Warning in TextField if disabled=true and no onChange is provided
Jul 18, 2017
If I create TextField element with
disabled={true}
attribute, but withoutonChange
, I receive warning:Warning: Failed prop type: You provided a `value` prop to the TextField without a `onChange` handler. This will render a read only field. Set either the `onChange` or use the `defaultValue` instead.
If component is disabled, then there is no sense to define
onChange
, because its read only field by definition.The text was updated successfully, but these errors were encountered: