wip: do not override selected values when recomputing facets

This commit is contained in:
Yohan Boniface 2024-05-07 12:21:31 +02:00
parent d805653e3c
commit 701b00f4f7

View file

@ -10,15 +10,18 @@ export default class Facets {
compute(names, defined) {
const properties = {}
let selected
names.forEach((name) => {
const type = defined[name]['type']
properties[name] = { type: type }
this.selected[name] = { type: type }
selected = this.selected[name] || {}
selected.type = type
if (!['date', 'datetime', 'number'].includes(type)) {
properties[name].choices = []
this.selected[name].choices = []
selected.choices = selected.choices || []
}
this.selected[name] = selected
})
this.map.eachBrowsableDataLayer((datalayer) => {