Version: 2022.3

SearchProvider.fetchPropositions

切换到手册
public Func<SearchContext,SearchPropositionOptions,IEnumerable<SearchProposition>> fetchPropositions ;

描述

Handler used to enumerate search propositions when the user is using TAB to auto-complete a query.

IEnumerable<SearchProposition> FetchPropositions(SearchContext context, SearchPropositionOptions options)
{
  foreach (var f in myFilters)
    yield return new SearchProposition(f.name, f.name, f.label);
}