is there any way in react-select v4 to not keep selected first option from lis when we search something?

16 Views Asked by At

enter image description here

as seen here, how can i remove first selected option from list?

i want to search something and on click Enter i would like to go to specific page but due to first option selected by default, i am navigating to link for first option.

i tried below solution but it doesn't seems to be working

if (searchRef?.current?.select) {
   searchRef.current.select.getNextFocusedOption = () => false;
}
0

There are 0 best solutions below