I am trying to create an onClick event that will only fire when the noOptionMessage is shown. The onClick will then search from a different array that shows a global list of codes instead of a result that only shows favorites codes by the user. That array is called allCptOptions
.
const favoriteCptOptions = docs.cptCodes.map(e => ({
label: e.code + " - " + e.description,
value: e.code
}));
const allCptOptions = fdata.cpt.map(e => ({
label: e.code + " - " + e.description,
value: e.code
}));
