MUI Textfield: Difference between InputProps disabled vs disabled

Viewed 30

In MUI textfield, you can disable it with different ways:

  1. By passing the disabled prop directly
  2. By passing the InputProps: {{ disabled: true }}
  3. By passing the inputProps: {{ disabled: true }}

While the 3rd one disables the input field only whereas the 1st and the 2nd disable the whole TextField component.

But, what is the difference between the 1st and the 2nd and which one should be used to disable the textfield? If aria-disabled needs to be applied to a textfield, should it be set in inputProps or InputProps as ARIA properties are not available directly?

Thanks

0 Answers
Related