Constructor
new SearchFilter(inputSelector, contentSelector, initial, callback, delay)
- Source:
- See:
Parameters:
Name | Type | Description |
---|---|---|
inputSelector |
string | The CSS selector used to target the text input element. |
contentSelector |
string | The CSS selector used to target the content container for these tabs. |
initial |
string | The initial value of the search query. |
callback |
function | A callback function which executes when the filter changes. |
delay |
number | The number of milliseconds to wait for text input before processing. |
Members
_content :HTMLElement|null
- Source:
A reference to the HTML container element of the tab content
Type:
- HTMLElement | null
_contentSelector :string
- Source:
The CSS selector used to target the tab content element
Type:
- string
_filter :function
- Source:
A debounced function which applies the search filtering
Type:
- function
_input :HTMLElement|null
- Source:
A reference to the HTML navigation element the tab controller is bound to
Type:
- HTMLElement | null
_inputSelector :string
- Source:
The CSS selector used to target the tab navigation element
Type:
- string
callback :function|null
- Source:
A callback function to trigger when the tab is changed
Type:
- function | null
query :string
- Source:
The value of the current query string
Type:
- string
Methods
bind(html)
- Source:
Bind the SearchFilter controller to an HTML application
Parameters:
Name | Type | Description |
---|---|---|
html |
HTMLElement |