Members
hierarchyCSS
- Source:
Created by IvanP on 14.11.2016.
Methods
addSearchBox(host, placeholder)
- Source:
Adds a search icon and a search box to the header of the hierarchy column (host)
Parameters:
| Name | Type | Description |
|---|---|---|
host |
HTMLTableCellElement | header of the hierarchy column |
placeholder |
String | Placeholder text in the searchfield |
clearSearch()
- Source:
Nulls search and redoes it, used in toggling between flat and tree views in hierarchy, necessary because the search is done on different name strings
focusFollows()
- Source:
Allows focus to follow from a search field into floating header and back when header disappears.
search() → {function}
- Source:
Wrapping function that debounces search, sets search.searching (click for info) and calls hierarchy.searchRowheaders (click for info)
Returns:
- Type
- function
searchRowheaders(str)
- Source:
This function runs through the data and looks for a match in row.meta.flatName (for flat view) or row.meta.name (for tree view) against the str.
Parameters:
| Name | Type | Description |
|---|---|---|
str |
String | expression to match against (is contained in |
updateSearchTarget(e)
- Source:
Updates search.target && search.query in hierarchy.search to know which input triggered the search and update the search.query in the other
Parameters:
| Name | Type | Description |
|---|---|---|
e |
Event | a debounced event triggered by input field when a person enters text |