@lunit/oui
Version:
Lunit Oncology UI components
21 lines (20 loc) • 987 B
TypeScript
import type { ReactNode } from 'react';
import type { AutocompleteProps as MuiAutocompleteProps } from '@mui/material';
type MuiBase = MuiAutocompleteProps<string, true, true, true>;
export interface AutocompleteProps extends Omit<MuiBase, 'renderInput' | 'renderValue' | 'renderTags' | 'multiple' | 'freeSolo' | 'disableClearable'> {
/** Placeholder shown in the text input. */
placeholder?: string;
/** Whether the field is in an error state. */
error?: boolean;
/** Helper / error message shown below the input. */
helperText?: string;
/** Shows a loading indicator and `noOptionsText` while fetching options. */
loading?: boolean;
/** Message shown when there are no matching options. */
noOptionsText?: ReactNode;
/** Called when a selected chip's delete icon is clicked. */
onDelete?: (value: string) => void;
/** When provided, renders a clear button in the input adornment. */
onClearButtonClick?: () => void;
}
export {};