1
0
Fork 0
mirror of https://github.com/koalyptus/TableFilter.git synced 2024-05-19 23:06:42 +02:00

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> <!DOCTYPE html>
<html lang="en"> <html lang="en">
<head> <head>
<title>tablefilter v0.6.50 - Starter</title> <title>tablefilter v0.6.56 - Starter</title>
</head> </head>
<body> <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", "name": "tablefilter",
"version": "0.6.55", "version": "0.6.56",
"description": "A Javascript library making HTML tables filterable and a bit more", "description": "A Javascript library making HTML tables filterable and a bit more",
"license": "MIT", "license": "MIT",
"author": { "author": {

View file

@ -1057,7 +1057,7 @@ export class TableFilter {
this.setFixedLayout(); this.setFixedLayout();
} }
if (this.stickyHeaders && this.dom().tHead) { 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 position initial
// stick headers // stick headers
thead.sticky &.sticky
th th
position sticky position sticky
top -1px top -1px

View file

@ -1,7 +1,6 @@
var tf = new TableFilter('demo', { var tf = new TableFilter('demo', {
base_path: '../dist/tablefilter/', base_path: '../dist/tablefilter/'
sticky_headers: true
}); });
tf.init(); tf.init();
@ -13,8 +12,6 @@ test('thead', function() {
deepEqual(tf.getRowsNb(), 7, 'nb working rows'); deepEqual(tf.getRowsNb(), 7, 'nb working rows');
deepEqual(tf.getRowsNb(true), 9, 'nb working rows with headers'); deepEqual(tf.getRowsNb(true), 9, 'nb working rows with headers');
notEqual(tf.getFilterElement(0), null, 'Filter element for column 0'); 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.setFilterValue(1, 'Ade');
tf.filter(); tf.filter();