Search
Members
PLUGIN_KEY
Search.PLUGIN_KEY
Returns the plugin key used to identify and access this plugin within Handsontable.
PLUGIN_PRIORITY
Search.PLUGIN_PRIORITY
Returns the priority value that determines the plugin’s initialization order relative to other plugins.
Methods
destroy
search.destroy()
Destroys the plugin instance.
disablePlugin
search.disablePlugin()
Disables the plugin functionality for this Handsontable instance.
enablePlugin
search.enablePlugin()
Enables the plugin functionality for this Handsontable instance.
getCallback
search.getCallback() ⇒ function
Gets the callback function.
Returns: function - Return the callback function.
getQueryMethod
search.getQueryMethod() ⇒ function
Gets the query method function.
Returns: function - Return the query method.
getSearchResultClass
search.getSearchResultClass() ⇒ string
Gets search result cells class name.
Returns: string - Return the cell class name.
isEnabled
search.isEnabled() ⇒ boolean
Checks if the plugin is enabled in the handsontable settings. This method is executed in Hooks#beforeInit
hook and if it returns true then the AutoRowSize#enablePlugin method is called.
query
search.query(queryStr, [callback], [queryMethod]) ⇒ Array<object>
Makes the query.
| Param | Type | Description |
|---|---|---|
| queryStr | string | Value to be search. |
| [callback] | function | optional Callback function performed on cells with values which matches to the searched query. |
| [queryMethod] | function | optional Query function responsible for determining whether a query matches the value stored in a cell. |
Returns: Array<object> - Return an array of objects with row, col, data properties or empty array.
setCallback
search.setCallback(newCallback)
Sets the callback function. This function will be called during querying for each cell.
| Param | Type | Description |
|---|---|---|
| newCallback | function | A callback function. |
setQueryMethod
search.setQueryMethod(newQueryMethod)
Sets the query method function. The function is responsible for determining whether a query matches the value stored in a cell.
| Param | Type | Description |
|---|---|---|
| newQueryMethod | function | A function with specific match logic. |
setSearchResultClass
search.setSearchResultClass(newElementClass)
Sets search result cells class name. This class name will be added to each cell that belongs to the searched query.
| Param | Type | Description |
|---|---|---|
| newElementClass | string | CSS class name. |
updatePlugin
search.updatePlugin()
Updates the plugin’s state.
This method is executed when updateSettings() is invoked with any of the following configuration options: