mxkaske / mxkaske.dev

https://craft.mxkaske.dev
MIT License
773 stars 30 forks source link

Comma to add new entry #12

Open SaadBazaz opened 11 months ago

SaadBazaz commented 11 months ago

Similar behavior to freeSolo by MUI (https://mui.com/material-ui/react-autocomplete/#free-solo) and multiselect.

Basically, press comma or Enter on keyboard to enter an entry, even if it doesn't exist in the autocomplete list.

rossirpaulo commented 9 months ago

Any progress here?

mxkaske commented 9 months ago

Hey! Unfortunately, I didn't have the time to implement it. With the handleKeyDown listener, we could add an additional check to submit the input.

Edit: might be a bit more complex but the idea is add more logic into the listener such as "Enter" and "," to also allow new entries to be submitted.