@activecollab/components
Version:
ActiveCollab Components
41 lines • 1.65 kB
TypeScript
import { FC, ReactElement, Ref, ReactNode } from "react";
import { Placement } from "@popperjs/core";
import { IAutocompleteProps } from "../Autocomplete/Autocomplete";
export interface ElementWithRef<T> extends ReactElement {
ref?: Ref<T>;
}
export interface ISelectProps extends Omit<IAutocompleteProps, "handleChange" | "inputEl" | "handleEmptyAction" | "clearInputOnSelect" | "mixedOptions"> {
/** Menu width mode */
mode?: "normal" | "wider" | "tiny";
/** Set select target element */
target?: ElementWithRef<Element>;
/** Set Select position */
position?: Placement;
/** onChange callback */
onChange?: (e: (string | number)[] | string | number) => void;
/** Placeholder for Select input */
placeholder?: string;
/** Function that triggers when empty is clicked */
emptyAction?: (e: string | undefined) => void;
/** Removes input from Select */
disableSearch?: boolean;
/** Close menu on select */
forceCloseMenu?: boolean;
/** Set select classNames */
selectClassName?: string;
/** Callback called when the Select menu is opened */
onSelectOpen?: () => void;
/** Callback called when the Select menu is closed */
onSelectClose?: () => void;
/** Node element on the left side */
startAdornment?: ReactNode;
/** Node element on the right side */
endAdornment?: ReactNode;
/** Focus search input on inline select */
focusInput?: boolean;
/** Mixed options values */
mixed?: (string | number)[];
disableVirtualization?: boolean;
}
export declare const Select: FC<ISelectProps>;
//# sourceMappingURL=Select.d.ts.map