How to Select first suggestion by default if user not selected any suggestion??
My requirement is => if user didn't select any suggestion and suggestion is available then on outside click by default first suggestion should get selected.
If there is no suggestion then the value enter by user should remain as it is.
Problem: While I am setting state on onSuggestionSelected. updated state is not accessible in onSuggestionsClearRequested.
- Is there any way that in onSuggestionsClearRequested function I will know that user has selected the suggestion or just click outside
How to Select first suggestion by default if user not selected any suggestion??
My requirement is => if user didn't select any suggestion and suggestion is available then on outside click by default first suggestion should get selected.
If there is no suggestion then the value enter by user should remain as it is.
Problem: While I am setting state on onSuggestionSelected. updated state is not accessible in onSuggestionsClearRequested.