FuzzySuggestModal.getSuggestions method
FuzzySuggestModal › getSuggestions
Official
Get the suggestions for the fuzzy match.Signature:
getSuggestions(query: string): FuzzyMatch<T>[]Parameters:
| Parameter | Type | Description |
|---|---|---|
| query | string | The query. |
Returns: FuzzyMatch<T>[] — The matching items, sorted by score.
Since: 0.9.20
Example:
class MyFuzzySuggestModal extends FuzzySuggestModal<string> { public override getSuggestions(query: string): FuzzyMatch<string>[] { return [{ item: 'foo' + query, match: { score: 1, matches: [[0, 3]] } }]; }}