Files
starface-outlook-sync-addin/node_modules/@fluentui/react/lib-commonjs/components/pickers/Suggestions/SuggestionsController.d.ts
T
Stefan Hacker 37ad745546 first commit
2026-04-03 09:38:48 +02:00

31 lines
1.2 KiB
TypeScript

import type { ISuggestionModel } from './Suggestions.types';
/**
* {@docCategory Pickers}
*/
export declare class SuggestionsController<T> {
currentIndex: number;
currentSuggestion: ISuggestionModel<T> | undefined;
suggestions: ISuggestionModel<T>[];
constructor();
updateSuggestions(newSuggestions: T[], selectedIndex?: number, maxCount?: number): void;
/**
* Increments the suggestion index and gets the next suggestion in the list.
*/
nextSuggestion(): boolean;
/**
* Decrements the suggestion index and gets the previous suggestion in the list.
*/
previousSuggestion(): boolean;
getSuggestions(): ISuggestionModel<T>[];
getCurrentItem(): ISuggestionModel<T>;
getSuggestionAtIndex(index: number): ISuggestionModel<T>;
hasSelectedSuggestion(): boolean;
removeSuggestion(index: number): void;
createGenericSuggestion(itemToConvert: ISuggestionModel<T> | T): void;
convertSuggestionsToSuggestionItems(suggestions: Array<ISuggestionModel<T> | T>): ISuggestionModel<T>[];
deselectAllSuggestions(): void;
setSelectedSuggestion(index: number): void;
private _isSuggestionModel;
private _ensureSuggestionModel;
}