fix(ui): [WIP] #2390 confirm pill edit with comma
This commit is contained in:
parent
d8e548ce46
commit
dd4125b5fd
|
@ -20,10 +20,10 @@ onMounted(() => {
|
||||||
})
|
})
|
||||||
|
|
||||||
const sanitize = () =>
|
const sanitize = () =>
|
||||||
model.value = model.value?.replace(',', '')?.trim()
|
model.value = (console.log("SANITIZE"), model.value?.replace(',', '')?.trim())
|
||||||
|
|
||||||
const sanitizeAndBlur = () =>
|
const sanitizeAndBlur = () =>
|
||||||
sanitize() && input.value?.blur()
|
sanitize() || input.value?.blur()
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
@ -49,6 +49,7 @@ const sanitizeAndBlur = () =>
|
||||||
ref="input"
|
ref="input"
|
||||||
contenteditable
|
contenteditable
|
||||||
class="pill-content"
|
class="pill-content"
|
||||||
|
style="flex-grow: 1; text-align: start;"
|
||||||
@keydown.enter.prevent="sanitizeAndBlur"
|
@keydown.enter.prevent="sanitizeAndBlur"
|
||||||
@keyup.space.prevent="sanitizeAndBlur"
|
@keyup.space.prevent="sanitizeAndBlur"
|
||||||
@keyup.,.prevent="sanitizeAndBlur"
|
@keyup.,.prevent="sanitizeAndBlur"
|
||||||
|
|
Loading…
Reference in New Issue