@react-typed-forms/mui
Version:

14 lines (13 loc) • 661 B
TypeScript
import { Control } from "@react-typed-forms/core";
import { TextFieldProps } from "@mui/material";
import React, { ReactNode } from "react";
export interface MultiSelectOption<V = any> {
value: V;
name: string;
}
export type FMultiSelectProps<V extends string | number> = {
state: Control<V[] | undefined | null>;
options: MultiSelectOption[];
renderItem?: (name: string, selected: boolean) => ReactNode;
} & Omit<TextFieldProps, "onChange" | "children" | "select">;
export declare function FMultiSelect<V extends string | number>({ state, helperText, options, defaultValue, renderItem, ...props }: FMultiSelectProps<V>): React.JSX.Element;