Skip to content

Commit

Permalink
reset() method's first load option is fixed.
Browse files Browse the repository at this point in the history
  • Loading branch information
halillusion committed May 16, 2022
1 parent 1a133f6 commit 4180805
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions kalipso.table.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class KalipsoTable {
*/
constructor(options) {

this.version = '0.8.1';
this.version = '0.8.2';
this.loading = false;
this.result = [];
this.server = false;
Expand Down Expand Up @@ -251,7 +251,7 @@ class KalipsoTable {
*/
async reset() {
if (document.querySelector(this.selector)) {
await this.prepareBody(true);
await this.prepareBody(false);
}
}

Expand Down Expand Up @@ -731,8 +731,9 @@ class KalipsoTable {
* @param object el clicked button
* @param integer index for change action
*/
async sort(element, index) {
async sorting(element, index) {

console.log(element,);
if (Array.from(element.classList).indexOf("asc") !== -1) { // asc

element.classList.remove("asc")
Expand Down Expand Up @@ -827,7 +828,7 @@ class KalipsoTable {
let target = event.target;
if (target.nodeName === "TH" && target.hasAttribute("data-sort")) {
event.preventDefault();
that.sort(target, target.cellIndex);
that.sorting(target, target.cellIndex);
}
}, {capture: true});

Expand Down

0 comments on commit 4180805

Please sign in to comment.