react-select-async-paginate icon indicating copy to clipboard operation
react-select-async-paginate copied to clipboard

Add the following props support onSelectResetsInput

Open Rahulk4128 opened this issue 1 year ago • 4 comments

I want my input value and the option should retain even if I select an option it should not get clean.

Rahulk4128 avatar Apr 12 '24 10:04 Rahulk4128

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.

Rahulk4128 avatar Apr 12 '24 10:04 Rahulk4128

Hello. Does react-select support something like this?

vtaits avatar Apr 12 '24 16:04 vtaits

@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

Rahulk4128 avatar Apr 15 '24 12:04 Rahulk4128

Can confirm. Works with suggested example.

Strauteka avatar Jun 07 '24 11:06 Strauteka