Type error with prop multiline
Closed this issue · 3 comments
Describe the bug
If I use <MuiChipsInput multiline rows={3} />
, I get a type error.
Note the prop actually work, it's just a type issue.
To Reproduce
Steps to reproduce the behavior:
- Go to https://codesandbox.io/s/ancient-field-jedk7g?file=/src/App.tsx
- See type error in code editor
Expected behavior
The prop should not raise a type error.
Error is due to this line, I guess: https://github.com/viclafouch/mui-chips-input/blob/main/src/index.types.ts#L4
Hello @Elfayer
The component has not been developed to be compatible with a textarea. That's why "multiline" has been omitted from the types. In your opinion, does everything look right even with a textarea?
Actually there is 1 glitch: The number of rows stay the same, if I give rows={3}
, and I have 2 lines of chips (+ the input), it'll still show 5 rows. Since the MuiChipsInput isn't actually the TextField
it doesn't work.
Let's keep the multiline
omitted for now.