@adaptabletools/adaptable
Version:
Powerful AG Grid extension which provides advanced, cutting-edge functionality to meet all DataGrid requirements
40 lines (39 loc) • 2.3 kB
TypeScript
import * as React from 'react';
import { AdaptableComboboxProps, ComboboxDataProps, ComboboxItemType } from './comboboxUtils';
export type { AdaptableComboboxProps };
export type SingleComboboxProps<T extends ComboboxItemType> = Omit<AdaptableComboboxProps<T>, 'multiple' | 'value' | 'defaultValue' | 'onValueChange'> & {
value?: T['value'] | null;
defaultValue?: T['value'];
onValueChange?: (value: T['value'] | null, item: T | undefined) => void;
};
export declare const SingleCombobox: <T extends ComboboxItemType>(props: Omit<AdaptableComboboxProps<T>, "multiple" | "value" | "defaultValue" | "onValueChange"> & {
value?: T["value"] | null;
defaultValue?: T["value"];
onValueChange?: (value: T["value"] | null, item: T | undefined) => void;
}) => React.JSX.Element;
export type MultiComboboxProps<T extends ComboboxItemType> = Omit<AdaptableComboboxProps<T>, 'multiple' | 'value' | 'defaultValue' | 'onValueChange'> & {
value?: T['value'][];
defaultValue?: T['value'][];
onValueChange?: (value: T['value'][], item: T[] | undefined) => void;
showSelectAllCheckbox?: boolean;
/**
* Optional override for the Select All checkbox's tri-state value.
* When provided, replaces the default `selected.length === total` computation.
* Useful when the caller tracks selection externally (e.g. tree selections).
*/
selectAllCheckboxValue?: boolean | null;
/**
* Optional override for the Select All checkbox change handler.
* When provided, replaces the default behaviour of selecting / deselecting
* every item.
*/
onSelectAllCheckboxChange?: (checked: boolean) => void;
renderInputValues?: (items: T[]) => React.ReactNode;
renderInput?: boolean;
} & ComboboxDataProps<T>;
export declare const MultiCombobox: <T extends ComboboxItemType>(props: MultiComboboxProps<T>) => React.JSX.Element;
export type GridFilterComboboxProps<T extends ComboboxItemType> = Omit<MultiComboboxProps<T>, 'showSelectAllCheckbox' | 'searchable' | 'renderInput' | 'renderInputValues'> & {
showSelectedCount?: boolean;
};
export declare const GRID_FILTER_COMBBOX_ADJUSTMENTS_CLASSNAME: string;
export declare const GridFilterCombobox: <T extends ComboboxItemType>(props: GridFilterComboboxProps<T>) => React.JSX.Element;