import { MutableRefObject, useEffect, useState } from 'react'; import Select, { OptionsOrGroups, GroupBase } from 'react-select'; type Option = { label: string | number; value: string | number; } interface SelectorProps { name: string; label?: string; labelComponent?: JSX.Element; innerRef?: MutableRefObject; fieldClass?: string; options: OptionsOrGroups>; value?: number | string; onChangeCallback?: (value: number | string) => void; disabled?: boolean; } export default function Selector({ name, label, labelComponent, innerRef = null, fieldClass = '', value, options = [], onChangeCallback, disabled = false }: SelectorProps): JSX.Element { const [selectorValue, setSelectorValue] = useState