Open Rahulk4128 opened 5 months ago
after some R&D you can do this making a state and using inputValue, and inputValueChange. onInputChange={(inputVal: string, actionMeta: InputActionMeta) => { const { action, prevInputValue } = actionMeta; if (action === "menu-close") { setInputValue(prevInputValue); return } if (action === "input-blur") { setInputValue(prevInputValue); return } if (action === "input-change") { setInputValue(inputVal); return } if (action === "set-value") { setInputValue(inputVal || prevInputValue); return } // setInputValue(inputValue) }} but if simple prop can be added to library will be great. Thanks.
Hello. Does react-select
support something like this?
@vtaits yes react-select supports that. i have read a stack overflow article then I came to know about it. you can go through this link for reference. https://github.com/JedWatson/react-select/issues/2260
Can confirm. Works with suggested example.
I want my input value and the option should retain even if I select an option it should not get clean.