wip: do not override selected values when recomputing facets
This commit is contained in:
parent
d805653e3c
commit
701b00f4f7
1 changed files with 5 additions and 2 deletions
|
@ -10,15 +10,18 @@ export default class Facets {
|
||||||
|
|
||||||
compute(names, defined) {
|
compute(names, defined) {
|
||||||
const properties = {}
|
const properties = {}
|
||||||
|
let selected
|
||||||
|
|
||||||
names.forEach((name) => {
|
names.forEach((name) => {
|
||||||
const type = defined[name]['type']
|
const type = defined[name]['type']
|
||||||
properties[name] = { type: type }
|
properties[name] = { type: type }
|
||||||
this.selected[name] = { type: type }
|
selected = this.selected[name] || {}
|
||||||
|
selected.type = type
|
||||||
if (!['date', 'datetime', 'number'].includes(type)) {
|
if (!['date', 'datetime', 'number'].includes(type)) {
|
||||||
properties[name].choices = []
|
properties[name].choices = []
|
||||||
this.selected[name].choices = []
|
selected.choices = selected.choices || []
|
||||||
}
|
}
|
||||||
|
this.selected[name] = selected
|
||||||
})
|
})
|
||||||
|
|
||||||
this.map.eachBrowsableDataLayer((datalayer) => {
|
this.map.eachBrowsableDataLayer((datalayer) => {
|
||||||
|
|
Loading…
Reference in a new issue