10
0
mirror of https://github.com/LCPQ/QUESTDB_website.git synced 2024-07-23 11:17:42 +02:00

Fix cleaning select

This commit is contained in:
Mickaël Véril 2020-01-13 09:35:15 +01:00
parent be116ca2db
commit 10ad157c04

View File

@ -117,7 +117,7 @@ draft: false
}
}
$('#form_dat > fieldset > div > select,#sel_ref').each(function () {
$(this).find('option[value!=""]').remove()
$(this).empty()
})
$('#form_dat > fieldset > div > select').each(async function () {
const vals = uniq(window.dats.map((d) => { return d[$(this).attr("name")] }))
@ -271,6 +271,7 @@ draft: false
})
})
await window.doiCache.addRange(window.filtData.map((d) => d.DOI.string))
$(sel_ref).empty()
for (const el of uniq(window.filtData.map(d => [d.code, d.method.name, d.DOI.string]))) {
op = $("<option/>", {
value: JSON.stringify(el)