-
Main
- Dashboard No active orders
- Layouts
- Themes
- Starter kit
- Changelog2.0
- RTL version
-
Forms
- Form components
- JSON forms
- Text editors
- Pickers
- Form layouts
-
Components
- Basic components
- Content styling
- Extra components
- Color system
- Animations
- Icons
-
Layout
- Page layouts
- Sidebars
- Navbars
- Vertical navigation
- Horizontal navigation
- Menu levels
-
Data visualization
- Echarts library
- D3 library
- Dimple library
- C3 library
- Google charts
- Maps integration
-
Extensions
- Extensions
- JQuery UI
- File uploaders
- Event calendars
- Internationalization
-
Tables
- Basic tables
- Data tables
- Data tables extensions
- Handsontable
- Responsive tables
-
Page kits
- General pages
- Service pages
- User pages
- Application pages
- Widgets
Search plugin provides an easy interface to perform data search across Handsontable. First thing you should do, is enabling the plugin by setting the search
option to true
. When enabled, searchPluginexposes a new method query(queryStr), where queryStr
is a string to find within the table. By default, the search is case insensitive.
By default searchPlugin
adds htSearchResult
class to every cell which isSearchResult
property is true
. You can change this class using searchResultClass
option. If you wish to change the result class globally (for all Handsontable instances on the page), you can use Handsontable.Search.global.setDefaultSearchResultClass(className)
method.
The queryMethod
is responsible for determining whether a queryStr
matches the value stored in a cell. It takes 2 arguments: queryStr
and cellData
. The first is a string passed to query()
method. The second is a value returned by getDataAtCell()
. The queryMethod
function should return true if there is a match.
After calling queryMethod
, searchPlugin
calls callback(instance, rowIndex, colIndex, cellData, testResult)
for every cell. The default callback is responsible for setting the isSearchResult
property, so if you want to preserve this functionality, be sure to invoke Handsontable.Search.DEFAULT_CALLBACK
inside your custom callback.
0results found