mirror of
https://github.com/koalyptus/TableFilter.git
synced 2024-06-14 11:46:42 +02:00
implement sticky headers
This commit is contained in:
parent
46b21b4a20
commit
00150bc9e1
|
@ -13,7 +13,7 @@
|
|||
"array-bracket-spacing": 2,
|
||||
"keyword-spacing": ["error", { "after": true, "before": true }],
|
||||
"max-depth": [2, 7],
|
||||
"max-statements": [2, 131],
|
||||
"max-statements": [2, 133],
|
||||
"complexity": [2, 41],
|
||||
"no-unused-vars": 2,
|
||||
"no-eval": 2,
|
||||
|
|
2
dist/tablefilter/style/tablefilter.css
vendored
2
dist/tablefilter/style/tablefilter.css
vendored
File diff suppressed because one or more lines are too long
2
dist/tablefilter/tablefilter.js
vendored
2
dist/tablefilter/tablefilter.js
vendored
File diff suppressed because one or more lines are too long
2
dist/tablefilter/tablefilter.js.map
vendored
2
dist/tablefilter/tablefilter.js.map
vendored
File diff suppressed because one or more lines are too long
|
@ -859,6 +859,9 @@ export class TableFilter {
|
|||
*/
|
||||
this.prfxResponsive = 'resp';
|
||||
|
||||
/** @private */
|
||||
this.stickyCssClass = 'sticky';
|
||||
|
||||
/*** extensions ***/
|
||||
/**
|
||||
* List of loaded extensions
|
||||
|
@ -907,6 +910,12 @@ export class TableFilter {
|
|||
*/
|
||||
this.toolbar = isObj(f.toolbar) || Boolean(f.toolbar);
|
||||
|
||||
/**
|
||||
* Enable sticky headers
|
||||
* @type {Boolean}
|
||||
*/
|
||||
this.stickyHeaders = Boolean(f.sticky_headers);
|
||||
|
||||
/**
|
||||
* Features registry
|
||||
* @private
|
||||
|
@ -1048,6 +1057,9 @@ export class TableFilter {
|
|||
if (this.colWidths.length > 0) {
|
||||
this.setFixedLayout();
|
||||
}
|
||||
if (this.stickyHeaders && this.dom().tHead) {
|
||||
addClass(this.dom().tHead, this.stickyCssClass);
|
||||
}
|
||||
}
|
||||
|
||||
/* Load extensions */
|
||||
|
|
|
@ -32,6 +32,7 @@ div.helpCont
|
|||
color #333
|
||||
background #fff
|
||||
text-align left
|
||||
z-index 1000
|
||||
|
||||
a
|
||||
color #cc0000
|
||||
|
|
|
@ -28,10 +28,16 @@ table.TF
|
|||
border-bottom 1px solid $td-border-color
|
||||
text-overflow ellipsis
|
||||
|
||||
// responsiveness
|
||||
// responsive
|
||||
&.resp
|
||||
display block
|
||||
overflow-x auto
|
||||
|
||||
.sort-arrow
|
||||
position initial
|
||||
|
||||
// stick headers
|
||||
thead.sticky
|
||||
th
|
||||
position sticky
|
||||
top 0
|
||||
|
|
|
@ -30,6 +30,7 @@
|
|||
},
|
||||
btn_reset: true,
|
||||
status_bar: true,
|
||||
sticky_headers: true,
|
||||
msg_filter: 'Filtering...'
|
||||
};
|
||||
|
||||
|
|
|
@ -20,14 +20,15 @@ var tfConfig = {
|
|||
base_path: '../dist/tablefilter/',
|
||||
col_widths: [
|
||||
'150px', '100px', '100px',
|
||||
'70px', '70px', '70px',
|
||||
'70px', '60px', '60px'
|
||||
'100px', '100px', '100px',
|
||||
'90px', '90px', '90px'
|
||||
],
|
||||
alternate_rows: true,
|
||||
rows_counter: true,
|
||||
btn_reset: true,
|
||||
status_bar: true,
|
||||
load_filters_on_demand: true,
|
||||
sticky_headers: true,
|
||||
col_0: 'multiple',
|
||||
col_1: 'select',
|
||||
col_2: 'checklist'
|
||||
|
|
Loading…
Reference in a new issue