Skip to content

How to allow a leading space in CreatableSelect isMulti entries? #5956

Closed Answered by apetersonflc
apetersonflc asked this question in Q&A
Discussion options

You must be logged in to vote

I solved it by adding this at the start of the handleKeyDown event:


  const handleKeyDown = (event) => {
    if (event.code==="Space" && inputValue.length === 0) { 
      setInputValue(" ");
    } 

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by apetersonflc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant