mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
* added packages reference menu item. * removed the draft flag. * Updated docs by running script.
39 lines
1.4 KiB
Markdown
39 lines
1.4 KiB
Markdown
+++
|
|
# -----------------------------------------------------------------------
|
|
# Do not edit this file. It is automatically generated by API Documenter.
|
|
# -----------------------------------------------------------------------
|
|
title = "SuggestionsPlugin"
|
|
keywords = ["grafana","documentation","sdk","@grafana/ui"]
|
|
type = "docs"
|
|
+++
|
|
|
|
## SuggestionsPlugin() function
|
|
|
|
### SuggestionsPlugin() function
|
|
|
|
<b>Signature</b>
|
|
|
|
```typescript
|
|
export declare function SuggestionsPlugin({ onTypeahead, cleanText, onWillApplySuggestion, portalOrigin, }: {
|
|
onTypeahead?: (typeahead: TypeaheadInput) => Promise<TypeaheadOutput>;
|
|
cleanText?: (text: string) => string;
|
|
onWillApplySuggestion?: (suggestion: string, state: SuggestionsState) => string;
|
|
portalOrigin: string;
|
|
}): SlatePlugin;
|
|
```
|
|
<b>Import</b>
|
|
|
|
```typescript
|
|
import { SuggestionsPlugin } from '@grafana/ui';
|
|
```
|
|
<b>Parameters</b>
|
|
|
|
| Parameter | Type | Description |
|
|
| --- | --- | --- |
|
|
| { onTypeahead, cleanText, onWillApplySuggestion, portalOrigin, } | <code>{</code><br/><code> onTypeahead?: (typeahead: TypeaheadInput) => Promise<TypeaheadOutput>;</code><br/><code> cleanText?: (text: string) => string;</code><br/><code> onWillApplySuggestion?: (suggestion: string, state: SuggestionsState) => string;</code><br/><code> portalOrigin: string;</code><br/><code>}</code> | |
|
|
|
|
<b>Returns:</b>
|
|
|
|
`SlatePlugin`
|
|
|