EI-01
EI-01

Reputation: 1095

How to capture user's input in react-select without selecting from option

i am using react-select library and am wondering is there a way to capture's user input without selecting from the option. Basically if a user types in the field, i want to capture that input when it loses focus and not when selected from the option list. I tried using onBlur but it returns undefined as the value is never captured.

important note: The user doesn't click from the drop down options. basically types in the field and moves on to the next form field. But the value is always undefined.

Upvotes: 2

Views: 2060

Answers (1)

Steve -Cutter- Blades
Steve -Cutter- Blades

Reputation: 5422

What you're looking for is the react-select Creatable. They have extensive documentation for this.

Upvotes: 1

Related Questions