ag-grid-community
Version:
Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
44 lines (43 loc) • 3.16 kB
TypeScript
import type { AgComponentSelector, AgCoreBeanCollection, AgEvent, BaseEvents, BaseProperties, IPropertiesService } from 'ag-stack';
import type { ListOption } from './agList';
import { AgList } from './agList';
import { AgPickerField } from './agPickerField';
import type { AgPickerFieldParams } from './agPickerFieldParams';
import type { AgWidgetSelectorType } from './agWidgetSelectorType';
/** @internal AG_GRID_INTERNAL - Not for public use. Can change / be removed at any time. */
export interface AgSelectParams<TComponentSelectorType extends string, TValue = string> extends Omit<AgPickerFieldParams<TComponentSelectorType>, 'pickerType' | 'pickerAriaLabelKey' | 'pickerAriaLabelValue'> {
options?: ListOption<TValue>[];
pickerType?: string;
pickerAriaLabelKey?: string;
pickerAriaLabelValue?: string;
placeholder?: string;
}
type AgSelectEvent = 'selectedItem';
/** @internal AG_GRID_INTERNAL - Not for public use. Can change / be removed at any time. */
export interface AgSelectSelectedItemEvent extends AgEvent<'selectedItem'> {
/** The keydown that committed the value, when committed via keyboard. Absent for mouse commits. */
keyboardEvent?: KeyboardEvent;
}
/** @internal AG_GRID_INTERNAL - Not for public use. Can change / be removed at any time. */
export declare class AgSelect<TBeanCollection extends AgCoreBeanCollection<TProperties, TGlobalEvents, TCommon, TPropertiesService>, TProperties extends BaseProperties, TGlobalEvents extends BaseEvents, TCommon, TPropertiesService extends IPropertiesService<TProperties, TCommon>, TComponentSelectorType extends string, TValue = string | null> extends AgPickerField<TBeanCollection, TProperties, TGlobalEvents, TCommon, TPropertiesService, TComponentSelectorType, TValue, AgSelectParams<TComponentSelectorType, TValue> & AgPickerFieldParams<TComponentSelectorType>, AgSelectEvent, AgList<TBeanCollection, TProperties, TGlobalEvents, TCommon, TPropertiesService, TComponentSelectorType, AgSelectEvent, TValue>> {
protected listComponent: AgList<TBeanCollection, TProperties, TGlobalEvents, TCommon, TPropertiesService, TComponentSelectorType, AgSelectEvent, TValue> | undefined;
private tooltipFeature?;
private commitKeyboardEvent?;
constructor(config?: AgSelectParams<TComponentSelectorType, TValue>);
postConstruct(): void;
private onWrapperFocusOut;
private createListComponent;
protected createPickerComponent(): AgList<TBeanCollection, TProperties, TGlobalEvents, TCommon, TPropertiesService, TComponentSelectorType, "selectedItem", TValue>;
protected beforeHidePicker(): void;
protected onKeyDown(e: KeyboardEvent): void;
showPicker(): void;
addOptions(options: ListOption<TValue>[]): this;
addOption(option: ListOption<TValue>): this;
clearOptions(): this;
updateOptions(options: ListOption<TValue>[]): this;
setValue(value?: TValue, silent?: boolean, fromPicker?: boolean): this;
destroy(): void;
}
/** @internal AG_GRID_INTERNAL - Not for public use. Can change / be removed at any time. */
export declare const AgSelectSelector: AgComponentSelector<AgWidgetSelectorType>;
export {};