From 3292226eace98139dd50e9f82e25c6fa3de028a5 Mon Sep 17 00:00:00 2001 From: JOSEPH LE Date: Thu, 22 Feb 2024 14:07:40 +0700 Subject: [PATCH] update library --- JDataTable.js | 60 ++++++++++++++++++++++++++++++------ README.md | 85 ++++++++++++++++++++++++++++++--------------------- index.html | 45 +++++++++++++++++---------- 3 files changed, 131 insertions(+), 59 deletions(-) diff --git a/JDataTable.js b/JDataTable.js index 0e54259..64805a1 100644 --- a/JDataTable.js +++ b/JDataTable.js @@ -17,6 +17,7 @@ class TableData { enable: false, listColumn: [], }, + positionCaption: "top" }; constructor(tableId, config) { @@ -35,19 +36,20 @@ class TableData { ) { this.config.order = null; this.updateConfig(this.config); + // this.attachSortEventListeners(".ri-expand-up-down-fill"); } else { if (this.config.order === null) { this.config.order = { [`order_by_${column}`]: "desc", }; this.updateConfig(this.config); - this.attachSortEventListeners(".ri-arrow-down-s-fill"); + // this.attachSortEventListeners(".ri-arrow-down-s-fill"); } else { this.config.order = { [`order_by_${column}`]: "asc", }; this.updateConfig(this.config); - this.attachSortEventListeners(".ri-arrow-up-s-fill"); + // this.attachSortEventListeners(".ri-arrow-up-s-fill"); } } } @@ -188,20 +190,20 @@ class TableData { }); html += ""; // Initial pagination use 'data.links' - let htmlPagination = `