52 lines
2.5 KiB
TypeScript
52 lines
2.5 KiB
TypeScript
import * as React from 'react';
|
|
import { SuggestionsControl } from './Suggestions/SuggestionsControl';
|
|
import { SuggestionsStore } from './Suggestions/SuggestionsStore';
|
|
import type { IBaseFloatingPicker, IBaseFloatingPickerProps } from './BaseFloatingPicker.types';
|
|
import type { ISuggestionsControlProps } from './Suggestions/Suggestions.types';
|
|
import type { JSXElement } from '@fluentui/utilities';
|
|
export interface IBaseFloatingPickerState {
|
|
queryString: string;
|
|
suggestionsVisible?: boolean;
|
|
didBind: boolean;
|
|
}
|
|
export declare class BaseFloatingPicker<T extends {}, P extends IBaseFloatingPickerProps<T>> extends React.Component<P, IBaseFloatingPickerState> implements IBaseFloatingPicker {
|
|
protected selection: Selection;
|
|
protected root: React.RefObject<HTMLDivElement | null>;
|
|
protected suggestionStore: SuggestionsStore<T>;
|
|
protected suggestionsControl: React.RefObject<SuggestionsControl<T> | null>;
|
|
protected SuggestionsControlOfProperType: new (props: ISuggestionsControlProps<T>) => SuggestionsControl<T>;
|
|
protected currentPromise: PromiseLike<T[]>;
|
|
protected isComponentMounted: boolean;
|
|
private _async;
|
|
constructor(basePickerProps: P);
|
|
get inputText(): string;
|
|
get suggestions(): any[];
|
|
forceResolveSuggestion(): void;
|
|
get currentSelectedSuggestionIndex(): number;
|
|
get isSuggestionsShown(): boolean;
|
|
onQueryStringChanged: (queryString: string) => void;
|
|
hidePicker: () => void;
|
|
showPicker: (updateValue?: boolean) => void;
|
|
componentDidMount(): void;
|
|
componentDidUpdate(): void;
|
|
componentWillUnmount(): void;
|
|
completeSuggestion: () => void;
|
|
updateSuggestions(suggestions: T[], forceUpdate?: boolean): void;
|
|
render(): JSXElement;
|
|
protected renderSuggestions(): JSXElement | null;
|
|
protected onSelectionChange(): void;
|
|
protected updateValue(updatedValue: string): void;
|
|
protected updateSuggestionWithZeroState(): void;
|
|
protected updateSuggestionsList(suggestions: T[] | PromiseLike<T[]>): void;
|
|
protected onChange(item: T): void;
|
|
protected onSuggestionClick: (ev: React.MouseEvent<HTMLElement>, item: T, index: number) => void;
|
|
protected onSuggestionRemove: (ev: React.MouseEvent<HTMLElement>, item: T, index: number) => void;
|
|
protected onKeyDown: (ev: MouseEvent) => void;
|
|
private _updateActiveDescendant;
|
|
private _onResolveSuggestions;
|
|
private _onValidateInput;
|
|
private _updateSuggestionsVisible;
|
|
private _bindToInputElement;
|
|
private _unbindFromInputElement;
|
|
}
|