lookfirst / mui-rff

MUI 5 / Material UI + React Final Form

Home Page:https://lookfirst.github.io/mui-rff/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Autocomplete label is required when in mui it's optional

vanya829 opened this issue · comments

PLEASE NOTE, we currently only support MUI 4.x! Be sure that any issues you open are not related to 5.x!

Describe the bug
It's impossible to define autocomplete component without defining a label, which makes it impossible to use autocomplete without labels if needed by design.

To Reproduce
Steps to reproduce the behavior:

  1. Define autocomplete component.
  2. Don't put label as prop
  3. See typescript error

Expected behavior
No typescript error.

Additional context
TextField label prop definition in material: https://github.com/mui/material-ui/blob/master/packages/mui-material/src/TextField/TextField.d.ts#L102
Autocomplete label prop definition in mui-rff: https://github.com/lookfirst/mui-rff/blob/master/src/Autocomplete.tsx#L28

Hi @vanya829. Good find! Want to submit a PR to fix this?

@lookfirst Added PR, please have a look.

5.3.2 has been released. Thanks @vanya829