From 18381a8c2c921c9862791cadb3d429541f85aeb5 Mon Sep 17 00:00:00 2001 From: hman61 Date: Sat, 21 Sep 2024 08:12:29 -0700 Subject: [PATCH 1/3] minor improvments --- frameworks/keyed/doohtml-dom/js/Main.class.js | 9 ++++----- frameworks/keyed/doohtml/js/Main.class.js | 5 ++--- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/frameworks/keyed/doohtml-dom/js/Main.class.js b/frameworks/keyed/doohtml-dom/js/Main.class.js index def18fcdb..b522331b7 100644 --- a/frameworks/keyed/doohtml-dom/js/Main.class.js +++ b/frameworks/keyed/doohtml-dom/js/Main.class.js @@ -59,7 +59,7 @@ Doo.define( return data } getIndex(row) { - return this.data.rows.findIndex((item, i) => item.id === row.key) + return this.data.rows.findIndex((item) => item.id === row.key) } delete(elem) { @@ -92,9 +92,8 @@ Doo.define( } update() { - const bang = ' !!!' for (let i=0, len = this.data.rows.length;i Date: Sat, 21 Sep 2024 08:19:48 -0700 Subject: [PATCH 2/3] changed let to const --- frameworks/keyed/doohtml/js/Main.class.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frameworks/keyed/doohtml/js/Main.class.js b/frameworks/keyed/doohtml/js/Main.class.js index 34e8cfdc1..066a0627d 100644 --- a/frameworks/keyed/doohtml/js/Main.class.js +++ b/frameworks/keyed/doohtml/js/Main.class.js @@ -114,7 +114,7 @@ Doo.define( } if (elem) { - let row = this.getParentRow(elem) + const row = this.getParentRow(elem) if (row) { this.selectedRow = row row.className = DANGER From 1814e0af927ae64ca78bd1a3d27b0c9e90f17566 Mon Sep 17 00:00:00 2001 From: hman61 Date: Sat, 21 Sep 2024 08:53:54 -0700 Subject: [PATCH 3/3] reverted clear --- frameworks/keyed/doohtml-dom/js/Main.class.js | 3 ++- frameworks/keyed/doohtml/js/Main.class.js | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/frameworks/keyed/doohtml-dom/js/Main.class.js b/frameworks/keyed/doohtml-dom/js/Main.class.js index b522331b7..17f64a513 100644 --- a/frameworks/keyed/doohtml-dom/js/Main.class.js +++ b/frameworks/keyed/doohtml-dom/js/Main.class.js @@ -9,6 +9,7 @@ const lenA = adjectives.length, lenB = colours.length, lenC = nouns.length const DEFAULT_SIZE = 1000 const CHILD_1 = 1 const CHILD_998 = 998 +const BANG = ' !!!' const DANGER = 'danger' Doo.define( class Main extends Doo { @@ -113,7 +114,7 @@ Doo.define( } clear() { - this.tbody.nodeValue = '' + this.tbody.textContent = '' this.data.rows = [] } diff --git a/frameworks/keyed/doohtml/js/Main.class.js b/frameworks/keyed/doohtml/js/Main.class.js index 066a0627d..ec136ee8f 100644 --- a/frameworks/keyed/doohtml/js/Main.class.js +++ b/frameworks/keyed/doohtml/js/Main.class.js @@ -123,7 +123,7 @@ Doo.define( } clear() { - this.tbody.nodeValue = '' + this.tbody.textContent = '' this.data.rows = [] }