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(() => {
|
||||
rawSelectEl = select.value
|
||||
build()
|
||||
})
|
||||
|
||||
onUnmounted(() => {
|
||||
$(select.value)
|
||||
if (!rawSelectEl) return
|
||||
$(rawSelectEl)
|
||||
.off()
|
||||
.select2('destroy')
|
||||
rawSelectEl = null
|
||||
})
|
||||
</script>
|
||||
<template lang="pug">
|
||||
|
||||
Reference in New Issue
Block a user