findIndexOfSelectedOption = (component) => {
  const filterFunction = (child) => (isComponentOfType(Option, child) || isComponentOfType(Separator, child));
  return findIndex(filterReactChildren(
    component.props.children, filterFunction),
    (element) => (element.props.value === component.state.selectedValue)
  );
}
Returns the index of the entry with a certain value from the component's
children.

The index search includes separator & option components.