← DataGrid API

Component · v2.7.1

NgbSearchHighlightComponent

Reusable search-highlight controls for DataGrid or any external list/grid.

Import

import { NgbSearchHighlightComponent } from '@angular-bootstrap/ngbootstrap';

Selector:ngb-search-highlight

Declaration

Inputs

fields

Default:[]

selectedFields

selectedFields: string[]

Default:[]

term

term: string

Default:''

placeholder

placeholder: string

Default:'Type to highlight matches...'

searchAriaLabel

searchAriaLabel: string

Default:'Type to highlight matches'

fieldsLabel

fieldsLabel: string

Default:'Search in:'

fieldsAriaLabel

fieldsAriaLabel: string

Default:'Highlight fields'

searchIcon

searchIcon: string

Default:'🔍'

allowEmptySelection

allowEmptySelection: boolean

Default:false

Outputs

termChange

termChange: EventEmitter<string>

selectedFieldsChange

selectedFieldsChange: EventEmitter<string[]>

selectionChange

selectionChange: EventEmitter<NgbSearchHighlightSelectionChange>

Methods

setTerm

setTerm(term: string): void

isFieldSelected

isFieldSelected(field: string): boolean

toggleField

toggleField(field: string): void

Referenced types

Source: src/datagrid/src/search/search-highlight.component.ts in the installed @angular-bootstrap/ngbootstrap package. Angular compiler metadata and private members are omitted.

This project is not affiliated with ng-bootstrap or ngx-bootstrap. Those projects focus mainly on Bootstrap components for Angular. ngbootstrap focuses on Angular UI for data-heavy apps, especially Data Grid, Angular-native Form Builder, drag and drop workflows, documentation examples, and performance-focused Angular patterns.