mirror of
https://github.com/pretix/pretix.git
synced 2026-05-26 18:43:59 +00:00
fixes bug in checkin rules editor where jquery select2 does not get removed correctly from DOM (#6206)
This commit is contained in:
@@ -100,14 +100,19 @@ watch(() => props.value, (newval, oldval) => {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
let rawSelectEl: HTMLSelectElement | null = null
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
|
rawSelectEl = select.value
|
||||||
build()
|
build()
|
||||||
})
|
})
|
||||||
|
|
||||||
onUnmounted(() => {
|
onUnmounted(() => {
|
||||||
$(select.value)
|
if (!rawSelectEl) return
|
||||||
|
$(rawSelectEl)
|
||||||
.off()
|
.off()
|
||||||
.select2('destroy')
|
.select2('destroy')
|
||||||
|
rawSelectEl = null
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
<template lang="pug">
|
<template lang="pug">
|
||||||
|
|||||||
Reference in New Issue
Block a user