import React from "react"; import {Field} from "react-final-form"; import MultiSelect from "react-multi-select-component"; import {classNames, COL_WIDTHS} from "../../styles/utils"; interface Props { label?: string; options?: [] | any; name: string; className?: string; columns?: COL_WIDTHS; } const MultiSelectField: React.FC = ({ name, label, options, className, columns }) => (
val && val.map((item: any) => item.value)} format={val => val && val.map((item: any) => options.find((o: any) => o.value === item)) } render={({input, meta}) => ( )} />
); export default MultiSelectField;