2018-07-24 13:19:52 +02:00
|
|
|
import { Observable } from 'rxjs';
|
2019-01-18 18:03:45 +01:00
|
|
|
import { AutoCompleteGroup } from '../auto-complete-group';
|
2018-07-24 13:19:52 +02:00
|
|
|
|
|
|
|
export interface MultipleAutoCompleteConfiguration {
|
|
|
|
// Delay for performing the request. Default: 200ms.
|
|
|
|
requestDelay?: number;
|
2019-01-18 18:03:45 +01:00
|
|
|
// Min characters for the filtering to be applied. Default: 1.
|
2018-07-24 13:19:52 +02:00
|
|
|
minFilteringChars?: number;
|
|
|
|
// Load and present items from start, without user query. Default: true.
|
|
|
|
loadDataOnStart?: boolean;
|
|
|
|
// Static or initial items.
|
|
|
|
initialItems?: (excludedItems: any[]) => Observable<any[]>;
|
|
|
|
// Data retrieval function
|
|
|
|
filterFn?: (searchQuery: string, excludedItems: any[]) => Observable<any[]>;
|
|
|
|
// Property formating for input
|
|
|
|
displayFn?: (item: any) => string;
|
2019-01-18 18:03:45 +01:00
|
|
|
// Function to group results in the drop down
|
|
|
|
groupingFn?: (items: any[]) => AutoCompleteGroup[];
|
|
|
|
// Display function for the drop down title
|
2018-07-24 13:19:52 +02:00
|
|
|
titleFn?: (item: any) => string;
|
2019-01-18 18:03:45 +01:00
|
|
|
// Display function for the drop down subtitle
|
2018-07-24 13:19:52 +02:00
|
|
|
subtitleFn?: (item: any) => string;
|
|
|
|
}
|