RDT Highlight with Text Search


#1

Hi, I’m using the Text Search component with an ES provider. I have a raw data table within my visuals. The Text Search works ok, whenever I type a filter like field:Value, and it filters all my visuals. The problem is that it is not highlighting the word Value in the raw data table as it supposed to do. My configuration for the RDT is this one:

cf.provider('Elastic')
.source('duser_summary')
.fields(fields)
.graph('Raw Data Table')
.element('rdt')
.execute()

Am I missing any option for that? Or is that in the Text Search component?


#2

Hi @keith, I guess that what you are missing is the css for the highlighting. Toolkit by itself won’t apply any visual style but the class cf-highlighted-field to those elements matching your text query. So what you need to do, is to apply a couple of styles to that class:

.cf-highlighted-field {
    background-color: #b8e6bb;
    padding: 2px 3px;
    border-radius: 5px;
}