mirror of
https://github.com/umap-project/umap.git
synced 2025-04-29 20:02:36 +02:00
fix: do not fail in autocomplete if on_unselect is undefined
This commit is contained in:
parent
ff5195a787
commit
13a7a2257d
1 changed files with 2 additions and 2 deletions
|
@ -313,7 +313,7 @@ export const SingleMixin = (Base) =>
|
||||||
DomEvent.on(close, 'click', () => {
|
DomEvent.on(close, 'click', () => {
|
||||||
this.selectedContainer.innerHTML = ''
|
this.selectedContainer.innerHTML = ''
|
||||||
this.input.style.display = 'block'
|
this.input.style.display = 'block'
|
||||||
this.options.on_unselect(result)
|
this.options.on_unselect?.(result)
|
||||||
})
|
})
|
||||||
this.hide()
|
this.hide()
|
||||||
}
|
}
|
||||||
|
@ -342,7 +342,7 @@ export const MultipleMixin = (Base) =>
|
||||||
})
|
})
|
||||||
DomEvent.on(close, 'click', () => {
|
DomEvent.on(close, 'click', () => {
|
||||||
this.selectedContainer.removeChild(result_el)
|
this.selectedContainer.removeChild(result_el)
|
||||||
this.options.on_unselect(result)
|
this.options.on_unselect?.(result)
|
||||||
})
|
})
|
||||||
this.hide()
|
this.hide()
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue