@cmk/fe_utils
Version:
frontend utility library
22 lines (20 loc) • 1.09 kB
TypeScript
import { ChangeEvent, ReactNode } from 'react';
import { Chip, FormControlProps, AutocompleteProps, BoxProps } from '@mui/material';
import { CommonInputFieldProps } from './types';
export type CMultiAutocompleteProps = AutocompleteProps<(string | number | boolean)[], true, false, false, typeof Chip>;
export type MultiAutocompleteProps = CommonInputFieldProps & Omit<CMultiAutocompleteProps, 'defaultValue' | 'value' | 'onChange' | 'options' | 'renderInput'> & {
value?: (string | number | boolean)[];
options?: {
value: string | number | boolean;
label: ReactNode;
textLabel: string;
}[];
disableHelperText?: boolean;
disableLabel?: boolean;
labelSx?: BoxProps['sx'];
ContainerProps?: FormControlProps;
onChange?: (newValue: (string | number | boolean)[], e: ChangeEvent<HTMLInputElement>) => void;
defaultValue?: (string | number | boolean)[];
renderInput?: CMultiAutocompleteProps['renderInput'];
};
export declare const MultiAutocomplete: (props: MultiAutocompleteProps) => import("react/jsx-runtime").JSX.Element;