Type alias Trigger

Trigger: {
    char: string;
    items: Item[];
    searchRegExp?: RegExp;
    whitespaceBefore?: boolean;
    insertSpaceAfter?: boolean;
    showNoResult?: boolean;
    maxRenderedItems?: number;
}

Definition for a trigger ie what will trigger the suggestions, the corresponding items and how to add then

Type declaration

  • char: string

    Character that will trigger the suggestions

  • items: Item[]

    List of items to suggest

  • Optional searchRegExp?: RegExp

    Regular expression to match the search. The dropdown will be shown if what's after the trigger matches this regular expression

  • Optional whitespaceBefore?: boolean

    Whether there should be a whitespace before the trigger for the dropdown to be shown

    Default

    true
    
  • Optional insertSpaceAfter?: boolean

    Whether there should be a whitespace after a suggestion is selected

    Default

    true
    
  • Optional showNoResult?: boolean

    Whether to show "No result" in the dropdown when there are no suggestions instead of just hiding it

    Default

    false
    
  • Optional maxRenderedItems?: number

    Maximum number of results to show in the dropdown

    Default

    Infinity