Skip to content

Commit

Permalink
Fix lints
Browse files Browse the repository at this point in the history
  • Loading branch information
SandroHc committed Nov 20, 2023
1 parent 9239472 commit 9d7471c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions docs/demos/24-footer/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ <h1>Custom Footer</h1>
<tr>
<td colspan="2">This is a table footer.</td>
</tr>
</tfoot>
</tfoot>
<tfoot style="font-weight: bold">
<tr>
<td colspan="2">Total</td>
Expand All @@ -116,7 +116,7 @@ <h1>Custom Footer</h1>
import {DataTable} from "../dist/module.js"
window.dt = new DataTable("table", {
perPage: 5,
perPageSelect: [5, 10, 15, ["All", -1]],
perPageSelect: [5, 10, 15, ["All", -1]]
// A caption can also be specified this way:
// caption: 'This is another table caption.'
})
Expand Down
6 changes: 3 additions & 3 deletions src/datatable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,8 @@ export class DataTable {
this._virtualDOM = nodeToObj(this.dom, this.options.diffDomOptions || {})

this._tableAttributes = {...this._virtualDOM.attributes}
this._tableFooters = this._virtualDOM.childNodes?.filter(node => node.nodeName === 'TFOOT') ?? [];
this._tableCaptions = this._virtualDOM.childNodes?.filter(node => node.nodeName === 'CAPTION') ?? [];
this._tableFooters = this._virtualDOM.childNodes?.filter(node => node.nodeName === "TFOOT") ?? []
this._tableCaptions = this._virtualDOM.childNodes?.filter(node => node.nodeName === "CAPTION") ?? []
if (this.options.caption !== undefined) {
this._tableCaptions.push({
nodeName: "CAPTION",
Expand All @@ -175,7 +175,7 @@ export class DataTable {
data: this.options.caption
}
]
});
})
}

this.rows = new Rows(this)
Expand Down

0 comments on commit 9d7471c

Please sign in to comment.