sticky headers enhancement

This commit is contained in:
koalyptus 2018-08-26 11:56:51 +10:00
parent 7533499c40
commit 3231da9760
8 changed files with 9 additions and 12 deletions

4
dist/starter.html vendored
View File

@ -1,10 +1,10 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>tablefilter v0.6.50 - Starter</title>
<title>tablefilter v0.6.56 - Starter</title>
</head>
<body>
<h1>tablefilter v0.6.50</h1>
<h1>tablefilter v0.6.56</h1>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,6 +1,6 @@
{
"name": "tablefilter",
"version": "0.6.55",
"version": "0.6.56",
"description": "A Javascript library making HTML tables filterable and a bit more",
"license": "MIT",
"author": {

View File

@ -1057,7 +1057,7 @@ export class TableFilter {
this.setFixedLayout();
}
if (this.stickyHeaders && this.dom().tHead) {
addClass(this.dom().tHead, this.stickyCssClass);
addClass(this.dom(), this.stickyCssClass);
}
}

View File

@ -37,7 +37,7 @@ table.TF
position initial
// stick headers
thead.sticky
&.sticky
th
position sticky
top -1px

View File

@ -1,7 +1,6 @@
var tf = new TableFilter('demo', {
base_path: '../dist/tablefilter/',
sticky_headers: true
base_path: '../dist/tablefilter/'
});
tf.init();
@ -13,8 +12,6 @@ test('thead', function() {
deepEqual(tf.getRowsNb(), 7, 'nb working rows');
deepEqual(tf.getRowsNb(true), 9, 'nb working rows with headers');
notEqual(tf.getFilterElement(0), null, 'Filter element for column 0');
deepEqual(tf.dom().tHead.classList.contains(tf.stickyCssClass), true,
'Sticky headers CSS class');
tf.setFilterValue(1, 'Ade');
tf.filter();