mirror of
https://github.com/koalyptus/TableFilter.git
synced 2024-05-03 07:03:33 +02:00
Page:
1.09 Submit and reset button
Pages
1.0 Configuration
1.01 Appearance
1.02 Main features
1.03 Grid layout
1.04 Paging
1.05 Drop down filter
1.06 Checklist filter
1.07 Rows counter
1.08 Loading indicator
1.09 Submit and reset button
1.10 Status bar
1.11 Data types
1.12 Themes
1.13 Help instructions
1.14 Popup filters
1.15 No results message
1.16 Highlight keywords
1.17 State
1.18 Mark active columns
1.19 Toolbar
1.20 Single filter
2.0 TableFilter class
2.1 Public properties
2.2 Public methods
3.0 Extensions
3.1 Advanced grid
3.1 Sort
3.2 Column operations
3.3 Filters visibility
3.4 Columns visibility
4. Filter operators
Home
Obsolete
TODO
10
1.09 Submit and reset button
koalyptus edited this page 2017-12-08 21:59:54 +11:00
Table of Contents
Properties
Property | Type | Description | Remarks | Example |
---|---|---|---|---|
btn | boolean | if set true shows validation button in the grid (default - false) | var tfConfig = { btn: true} |
|
btn_text | string | changes the text of the validation button | var tfConfig = { btn_text: "Filter" } |
|
btn_css_class | string | defines the css class of the validation button | var tfConfig = { btn_css_class: "myClass" } |
|
btn_reset | boolean|object | if set true, it will show a "Reset" button at the top-right corner of the table allowing users to the filters (default - false) |
var tfConfig = { btn_reset: true }; // or var tfConfig = { btn_reset: {} }; |
|
target_id | string | defines the id of the element that will contain the reset button (default - null) |
var tfConfig = { btn_reset: { target_id: 'myContainerId' } }; |
|
text | string | sets text for the "Reset" button (default - null) |
var tfConfig = { btn_reset: { text: 'Clear all' } }; |
|
html | string | defines 'reset' button HTML (default - null) | note that the onclick event is added automatically
to the html element and overwrites any eventual onclick
attribute |
var tfConfig = { btn_reset: { html: '' } }; |
css_class | string | defines the css class of the reset button (default: 'reset') |
var tfConfig = { btn_reset: { css_class: 'my-css-class' } }; |
|
tooltip | string | defines the tooltip of the reset button (default: 'Clear filters') |
var tfConfig = { btn_reset: { tooltip: 'Clear all filters' } }; |
|
toolbar_position | string | defines where it will be placed inside the toolbar (default - 'right') | 3 possible values: 'left', 'center' and 'right' |
var tfConfig = { btn_reset: { toolbar_position: 'center' } }; |
Callbacks
Property | Type | Description | Remarks | Example |
---|---|---|---|---|
on_before_reset | function | callback function fired before filters are cleared | note that 2 parameters are passed to the callback function:
|
var tfConfig = { on_before_reset: function(tf, filterValues){ alert('Filters values to be cleared: '+filterValues); }} |
on_after_reset | function | callback function fired after filters are cleared |
note that one parameter is passed to the callback function:
|
var tfConfig = { on_after_reset: function(tf){ alert('Filters are cleared'); }} |