1
0
Fork 0
mirror of https://github.com/koalyptus/TableFilter.git synced 2024-06-20 06:35:24 +02:00

Merge pull request #638 from koalyptus/fixed-headers

sticky headers enhancement
This commit is contained in:
koalyptus 2018-08-26 11:48:13 +10:00 committed by GitHub
commit 2e089a1823
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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();