viclafouch / mui-chips-input

📌 A chips input designed for MUI (Material ui) V6
https://viclafouch.github.io/mui-chips-input/
MIT License
83 stars 19 forks source link

[Bug fix] entering chip on mobile in form does not work #24

Closed BennyAlex closed 1 year ago

BennyAlex commented 1 year ago

@viclafouch Hey, it's me again :P

When the chips input is inside an form, it's impossible to add a chip, since touching on the enter key will go to the next field instead by default. Here is a fix:

inputProps={{
        enterkeyhint: 'done'
      }}

since this is a common case this should be included by default.

viclafouch commented 1 year ago

Hello @BennyAlex !

Could you please share a codesandbox in order to test it on my mobile plz ?

Thanks!

albertus-andito commented 1 year ago
inputProps={{
        enterkeyhint: 'done'
      }}

While this generally works, seems like it doesn't work for all mobiles?

BennyAlex commented 1 year ago

@viclafouch here is an example. First one doesnt allow to enter a chip, with the fix it is possible. https://codesandbox.io/s/mui-chips-input-forked-wre96y?file=/src/App.js

@albertus-andito what do you mean exactly? @viclafouch maybe there has to be another enter key detection to be implemented