UNPKG

@fluentui/react

Version:

Reusable React components for building web experiences.

35 lines (34 loc) 1.35 kB
import * as React from 'react'; import type { ISuggestionModel } from '../../../Pickers'; import type { ISuggestionsCoreProps } from './Suggestions.types'; import type { JSXElement } from '@fluentui/utilities'; /** * Class when used with SuggestionsStore, renders a basic suggestions control */ export declare class SuggestionsCore<T extends {}> extends React.Component<ISuggestionsCoreProps<T>, {}> { currentIndex: number; currentSuggestion: ISuggestionModel<T> | undefined; protected _selectedElement: React.RefObject<HTMLDivElement | null>; private SuggestionsItemOfProperType; constructor(suggestionsProps: ISuggestionsCoreProps<T>); /** * Increments the selected suggestion index */ nextSuggestion(): boolean; /** * Decrements the selected suggestion index */ previousSuggestion(): boolean; get selectedElement(): HTMLDivElement | undefined; getCurrentItem(): ISuggestionModel<T>; getSuggestionAtIndex(index: number): ISuggestionModel<T>; hasSuggestionSelected(): boolean; removeSuggestion(index: number): void; deselectAllSuggestions(): void; setSelectedSuggestion(index: number): void; componentDidUpdate(): void; render(): JSXElement; scrollSelected(): void; private _onClickTypedSuggestionsItem; private _onRemoveTypedSuggestionsItem; }