How to get cancel button click event on Creatable react-select #4961
Replies: 1 comment 2 replies
-
Hello @thakran1989, I hope you don't mind me converting your issue to an discussion. It seemed to be the correct place for your query. The There are different actions regarding removal of a value ( <Select onChange={(value, meta) => {
meta.option // meta.action === `deselect-option`
meta.removedValue // meta.action === `remove-value` || meta.action === `pop-value`
meta.removedValues // meta.action === `clear`
}} /> |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I have been working on a project where I have used react-select creatable custom CreateSelect option (Multi Select input Text).
Now All I need is when I am adding any values I am able to add it easily. But when I am trying to remove the item that time I am checking in onChange function as mentioned in the example but all I am getting is full list of options. Here is my code snippet :
I am trying to delete the option and for that I need the clicked option. But I am not getting it. Is there any way that I can get the selected value here? I tried using bind(this) as well but it still gives me while list. All I want is the value which is being selected to be deleted.
Beta Was this translation helpful? Give feedback.
All reactions