From 1b5ff103f589140473068fd83340b0cc443fb420 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20H=C3=B6rnquist?= Date: Fri, 20 Nov 2020 23:01:32 +0100 Subject: Work on templetazing js. --- static/input_list.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'static/input_list.js') diff --git a/static/input_list.js b/static/input_list.js index 79e223c3..3b24b719 100644 --- a/static/input_list.js +++ b/static/input_list.js @@ -1,6 +1,4 @@ /* - TODO document 'input-list'. - ∀ children('.input-list') => 'unit' ∈ classList(child)
@@ -78,7 +76,6 @@ function init_input_list() { lst.get_value = lst.dataset.bindby; } else if (lst.dataset.joinby) { lst.get_value = get_value(lst.dataset.joinby); - } } else { lst.get_value = get_get_value(); } @@ -88,7 +85,7 @@ function init_input_list() { /* -------------------------------------------------- */ /* different function forms since we want to capture one self */ -const get_get_value(join=',') => function () { +const get_get_value = (join=',') => function () { return [...self.querySelectorAll('input')] .map(x => x.value) .filter(x => x != '') -- cgit v1.2.3