score:0

the problem relies on your fallback to "":

countrylist.filter((item) => {
  return item.countryid === values.countryid;
})[0] || ""

the error you're getting is that when the value is "" none of the options match with "" because it will try to run getoptionselected against "".

getoptionselected={(option, value) =>
  option.countryid === value.countryid // here, option is ""
}

Related Query

More Query from same tag