TeamWertarbyte / material-ui-chip-input

A chip input field using Material-UI.
https://mui.wertarbyte.com/#material-ui-chip-input
MIT License
737 stars 208 forks source link

Using semicolon for setting new chips #325

Closed appukuttan-shailesh closed 4 years ago

appukuttan-shailesh commented 4 years ago

I was previously making use of newChipKeyCodes to set new chips. I used to have: newChipKeys={[13, 186]}

But then I realized this works on Chrome but fails on Firefox as firefox has the keycode 59 for SemiColon, unlike Chrome which uses 186. Usefool tool to check: https://keycode.info/

So then based on the discussion here (https://github.com/TeamWertarbyte/material-ui-chip-input/issues/271), I moved to using newChipKeys. I used: newChipKeys={['Enter', 'Tab', ';'] and also newChipKeys={['Enter', 'Tab', 'Semicolon']

But neither of these are producing new chips with semi-colon. I can still form new chip with tab and enter.

What is the problem? How can I get it to work with semicolon?

appukuttan-shailesh commented 4 years ago

Oops.... my bad! Just realized it was a mistake at my end in passping props between components. I had forgotten to change the parameter name to "newChipKeys" when setting the property.

leMaik commented 4 years ago

@appukuttan-shailesh Glad you figured it out :+1: Please feel free to reach out if you discover another issue or need any help with the chip input.