File

packages/components/eui-table/pipes/eui-table-highlight.pipe.ts

Description

Pipe used to highlight the matching string in the data of the table when used with filter feature.

Example :
<td><span [innerHTML]="row.year | euiTableHighlight: strFilter"></span></td>


strFilter = '19'

Metadata

Methods

transform
transform(value: string, strFilter: string, className: string)

Wrap a matching string with a span element with a class name in the data of the table

Parameters :
Name Type Optional Default value Description
value string No

Data displayed in a cell.

strFilter string No

Search string to highlight.

className string No 'eui-u-text-search'

CSS class to add to the span element. Default: 'eui-u-text-search'

Returns : string

results matching ""

    No results matching ""