import React from "react"; import Creatable from "react-select/creatable"; import { WrappedFieldInputProps } from "redux-form"; type DropdownProps = { options: Array<{ value: string; label: string; }>; placeholder: string; isLoading?: boolean; input: WrappedFieldInputProps; onCreateOption: (inputValue: string) => void; }; const selectStyles = { container: (styles: any) => ({ ...styles, flex: 1, }), }; class CreatableDropdown extends React.Component { render() { const { placeholder, options, isLoading, onCreateOption, input, } = this.props; return ( input.onChange(value)} /> ); } } export default CreatableDropdown;