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.1 KiB
Markdown
39 lines
1.1 KiB
Markdown
+++
|
|
# -----------------------------------------------------------------------
|
|
# Do not edit this file. It is automatically generated by API Documenter.
|
|
# -----------------------------------------------------------------------
|
|
title = "findHighlightChunksInText"
|
|
keywords = ["grafana","documentation","sdk","@grafana/data"]
|
|
type = "docs"
|
|
+++
|
|
|
|
## findHighlightChunksInText() function
|
|
|
|
### findHighlightChunksInText() function
|
|
|
|
Adapt findMatchesInText for react-highlight-words findChunks handler. See https://github.com/bvaughn/react-highlight-words\#props
|
|
|
|
<b>Signature</b>
|
|
|
|
```typescript
|
|
export declare function findHighlightChunksInText({ searchWords, textToHighlight, }: {
|
|
searchWords: string[];
|
|
textToHighlight: string;
|
|
}): any[];
|
|
```
|
|
<b>Import</b>
|
|
|
|
```typescript
|
|
import { findHighlightChunksInText } from '@grafana/data';
|
|
```
|
|
<b>Parameters</b>
|
|
|
|
| Parameter | Type | Description |
|
|
| --- | --- | --- |
|
|
| { searchWords, textToHighlight, } | <code>{</code><br/><code> searchWords: string[];</code><br/><code> textToHighlight: string;</code><br/><code>}</code> | |
|
|
|
|
<b>Returns:</b>
|
|
|
|
`any[]`
|
|
|