mirror of
https://github.com/koalyptus/TableFilter.git
synced 2024-05-03 07:03:33 +02:00
Page:
3.3 Filters visibility
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
7
3.3 Filters visibility
koalyptus edited this page 2017-10-10 13:50:29 +11:00
With this extension, users can toggle the filters row visibility.
To get the filtersVisibility
extension instance:
var filtersVisibility = tf.extension('filtersVisibility');where
tf
is an instance of TableFilter
.
Property | Type | Description | Remarks | Example |
---|---|---|---|---|
stylesheet | string | the extension's stylesheet filename (default - 'filtersVisibility.css') |
var tfConfig = { extensions: [{ name: 'filtersVisibility', stylesheet: 'myStylesheet.css' }] }; |
|
target_id | string | defines the id of the container element that will contain the link/button showing / hiding filters row (default - null) |
var tfConfig = { extensions: [{ name: 'filtersVisibility', target_id: 'my_container_id' }] }; |
|
enable_icon | boolean | enable/disable default icon placed just before the link (default - true) |
var tfConfig = { extensions: [{ name: 'filtersVisibility', enable_icon: false }] }; |
|
btn_text | string | sets the text of the link showing / hiding filters row (default - '') |
var tfConfig = { extensions: [{ name: 'filtersVisibility', btn_text: 'Filters' }] }; |
|
btn_html | string | defines the HTML of the button showing / hiding filters row (default - null) | note that the onclick event is added automatically to the html element and may overwrite any associated click event |
var tfConfig = { extensions: [{ name: 'filtersVisibility', btn_html: '' }] }; |
btn_css_class | string | defines the css class of the link showing / hiding filters row (default - 'btnExpClpFlt') |
var tfConfig = { extensions: [{ name: 'filtersVisibility', btn_css_class: 'my-css-class' }] }; |
|
cont_css_class | string | defines the css class of the container (default - 'expClpFlt') |
var tfConfig = { extensions: [{ name: 'filtersVisibility', cont_css_class: 'my-css-class' }] }; |
|
filters_row_index | number | Only with external filters, it specifies which row contains the filters (default - 1) |
var tfConfig = { grid_layout: true, extensions: [{ name: 'filtersVisibility', filters_row_index: 0 }] }; |
|
visible_at_start | boolean | Set filters row visibility at start |
var tfConfig = { extensions: [{ name: 'filtersVisibility', visible_at_start: false }] }; |
|
on_before_show | function | callback fired before the filters' row is displayed |
1 parameter:
|
var tfConfig = { extensions: [{ name: 'filtersVisibility', on_before_show: function(o) { console.log(o.id); } }] }; |
on_after_show | function | callback fired after filters' row is displayed |
1 parameter:
|
var tfConfig = { extensions: [{ name: 'filtersVisibility', on_after_show: function(o) { console.log(o.id); } }] }; |
on_before_hide | function | callback fired before the filters' row is hidden |
1 parameter:
|
var tfConfig = { extensions: [{ name: 'filtersVisibility', on_before_hide: function(o) { console.log(o.id); } }] }; |
on_after_hide | function | callback fired after the filters' row is hidden |
1 parameter:
|
var tfConfig = { extensions: [{ name: 'filtersVisibility', on_after_hide: function(o) { console.log(o.id); } }] }; |
toolbar_position | string | defines where it will be placed inside the toolbar (default - 'right') | 3 possible values: 'left', 'center' and 'right' |
var tfConfig = { rows_counter: { toolbar_position: 'center' } }; |