From 17fff8118397845ad1f8a8189aae18715284c55d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micka=C3=ABl=20V=C3=A9ril?= Date: Mon, 27 Jan 2020 11:16:57 +0100 Subject: [PATCH] clearSelect is now a separate function --- content/multipledataset.html | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/content/multipledataset.html b/content/multipledataset.html index 62a5d5f0..c7d597aa 100644 --- a/content/multipledataset.html +++ b/content/multipledataset.html @@ -99,11 +99,14 @@ draft: false } } } - async function reloadSelect() { - reloadCustomFiles() + async function clearSelect() { $('#form_dat > fieldset > div > select,#sel_ref').each(function () { $(this).empty() }) + } + async function reloadSelect() { + reloadCustomFiles() + clearSelect() $('#form_dat > fieldset > div > select').each(async function () { const vals = uniq(window.dats.map((d) => { switch ($(this).attr("name")) {