3
0
mirror of https://github.com/grafana/grafana.git synced 2025-02-25 18:55:37 -06:00
grafana/docs/sources/packages_api/data/findhighlightchunksintext.md
Marcus Andersson cc3fc18076
Docs: enable packages reference docs for 7-beta ()
* added packages reference menu item.

* removed the draft flag.

* Updated docs by running script.
2020-04-28 09:53:58 +02:00

1.1 KiB

+++

-----------------------------------------------------------------------

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

Signature

export declare function findHighlightChunksInText({ searchWords, textToHighlight, }: {
    searchWords: string[];
    textToHighlight: string;
}): any[];

Import

import { findHighlightChunksInText } from '@grafana/data';

Parameters

Parameter Type Description
{ searchWords, textToHighlight, } {
searchWords: string[];
textToHighlight: string;
}

Returns:

any[]