import { SelectProps } from "antd";
import { ReactNode } from "react";

export interface ProSelectProps extends SelectProps<any> {
  optionList: any[] | undefined;
  valueField?: string;
  displayField?: string;
  autoComplete?: boolean;
  ref?: React.MutableRefObject<any>;
  showDialog?: () => void;
  // to spread all the option's properties; <Option id={id} name={name} ... etc >
  // so you can access them via option param (second param in the onSelect func)
  spreadOptionProps?: boolean;
  fixedPosition?: boolean;
  labelField?: string;
  defaultOpen?: boolean;
  withAdd?: boolean;
  addingForm?: ReactNode;
  formTitle?: string;
  refetch?: any // to refetch data after success
}
