Home Identifier Source Repository
import {HighlightKeyword} from 'TableFilter/src/modules/highlightKeywords.js'
public class | source

HighlightKeyword

Constructor Summary

Public Constructor
public

HighlightKeyword, highlight matched keyword

Member Summary

Public Members
public
public
public

tf: *

Method Summary

Public Methods
public

highlight(node: Node, word: String, cssClass: String)

highlight occurences of searched term in passed node

public

unhighlight(word: String, cssClass: String)

Removes highlight to nodes matching passed string

public

Clear all occurrences of highlighted nodes

Public Constructors

public constructor(tf: Object) source

HighlightKeyword, highlight matched keyword

Params:

NameTypeAttributeDescription
tf Object

TableFilter instance

Public Members

public highlightCssClass: * source

public highlightedNodes: * source

public tf: * source

Public Methods

public highlight(node: Node, word: String, cssClass: String) source

highlight occurences of searched term in passed node

Params:

NameTypeAttributeDescription
node Node
word String

Searched term

cssClass String

Css class name

public unhighlight(word: String, cssClass: String) source

Removes highlight to nodes matching passed string

Params:

NameTypeAttributeDescription
word String
cssClass String

Css class to remove

public unhighlightAll() source

Clear all occurrences of highlighted nodes