score:0

const changeHandler = (_, option) => {
  const value = option.children.filter((each) => typeof each !== 'object');
  setSelectedOption({ value: option.key, text: value });
};

Related Query

More Query from same tag