You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Update the onSelect handler to store the selected search in the recent searches state.
onSelect={(newValue: string)=>{constoption=options.find((o)=>o.value===newValue);if(option){onSelect(option);setSelectOption(option);setRecentSearches((prev)=>[option, ...prev.filter(o=>o.id!==option.id)].slice(0,5));// Keep only the last 5 searches}}}
https://www.loom.com/share/3635973fd10840f0a24743080f79a6ec
The text was updated successfully, but these errors were encountered: