2023-02-14 23:25:05 +00:00
|
|
|
type SelectItem<
|
|
|
|
ValueType = string,
|
|
|
|
DisplayValueType = ValueType | import('react').ReactNode,
|
|
|
|
> = {
|
|
|
|
displayValue?: DisplayValueType;
|
|
|
|
value: ValueType;
|
|
|
|
};
|
2023-02-17 05:28:21 +00:00
|
|
|
|
|
|
|
type OperateSelectItemFunction = (value: string) => boolean;
|
|
|
|
|
|
|
|
type SelectWithLabelOptionalProps = {
|
|
|
|
checkItem?: OperateSelectItemFunction;
|
|
|
|
disableItem?: OperateSelectItemFunction;
|
2023-02-23 03:17:55 +00:00
|
|
|
formControlProps?: import('@mui/material').FormControlProps;
|
2023-02-17 05:28:21 +00:00
|
|
|
hideItem?: OperateSelectItemFunction;
|
|
|
|
isCheckableItems?: boolean;
|
|
|
|
isReadOnly?: boolean;
|
|
|
|
inputLabelProps?: Partial<
|
|
|
|
import('../components/OutlinedInputLabel').OutlinedInputLabelProps
|
|
|
|
>;
|
|
|
|
label?: string;
|
|
|
|
messageBoxProps?: Partial<import('../components/MessageBox').MessageBoxProps>;
|
2023-03-02 21:25:58 +00:00
|
|
|
required?: boolean;
|
2023-02-17 05:28:21 +00:00
|
|
|
selectProps?: Partial<SelectProps>;
|
|
|
|
};
|
|
|
|
|
|
|
|
type SelectWithLabelProps = SelectWithLabelOptionalProps &
|
2023-03-04 02:06:07 +00:00
|
|
|
Pick<SelectProps, 'name' | 'onBlur' | 'onChange' | 'onFocus' | 'value'> & {
|
2023-02-17 05:28:21 +00:00
|
|
|
id: string;
|
|
|
|
selectItems: Array<SelectItem | string>;
|
|
|
|
};
|