Select component. How to get the whole option as value in an onChange handler? #48297
-
Hello, I have the following Select component:
And this is my onChange handler:
When I change the select value, I only get as How I can get the whole option instead of only the value field?, I mean, If I've selected 'small', I would like to get the following option element of the options array: Thanks in advance |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
You can get the selected option by this way: const handleOnChangeSelectSize = (value, option) => {
console.log(value, option);
} |
Beta Was this translation helpful? Give feedback.
You can get the selected option by this way: