-
+
-
+
@@ -14,10 +14,10 @@
-
+
-
+
diff --git a/client/components/ui/MultiSelectQueryInput.vue b/client/components/ui/MultiSelectQueryInput.vue
index 25107b79..7c8e7005 100644
--- a/client/components/ui/MultiSelectQueryInput.vue
+++ b/client/components/ui/MultiSelectQueryInput.vue
@@ -215,6 +215,10 @@ export default {
inputBlur() {
if (!this.isFocused) return
+ if (typeof this.textInput === 'string') {
+ this.textInput = this.textInput.trim()
+ }
+
setTimeout(() => {
if (document.activeElement === this.$refs.input) {
return
@@ -231,6 +235,11 @@ export default {
},
forceBlur() {
this.isFocused = false
+
+ if (typeof this.textInput === 'string') {
+ this.textInput = this.textInput.trim()
+ }
+
if (this.textInput) this.submitForm()
if (this.$refs.input) this.$refs.input.blur()
},
@@ -289,11 +298,12 @@ export default {
this.selectedMenuItemIndex = null
},
submitForm() {
- if (!this.textInput) return
+ if (!this.textInput || !this.textInput.trim?.()) return
+
+ this.textInput = this.textInput.trim()
- const cleaned = this.textInput.trim()
const matchesItem = this.items.find((i) => {
- return i.name === cleaned
+ return i.name === this.textInput
})
if (matchesItem) {
diff --git a/client/components/ui/TextInput.vue b/client/components/ui/TextInput.vue
index 6e621870..23478dee 100644
--- a/client/components/ui/TextInput.vue
+++ b/client/components/ui/TextInput.vue
@@ -40,7 +40,8 @@ export default {
showCopy: Boolean,
step: [String, Number],
min: [String, Number],
- customInputClass: String
+ customInputClass: String,
+ trimWhitespace: Boolean
},
data() {
return {
@@ -101,9 +102,13 @@ export default {
this.$emit('focus')
},
blurred() {
+ if (this.trimWhitespace && typeof this.inputValue === 'string') {
+ this.inputValue = this.inputValue.trim()
+ }
this.isFocused = false
this.$emit('blur')
},
+
change(e) {
this.$emit('change', e.target.value)
},
diff --git a/client/components/ui/TextInputWithLabel.vue b/client/components/ui/TextInputWithLabel.vue
index a10394bd..3d1c8209 100644
--- a/client/components/ui/TextInputWithLabel.vue
+++ b/client/components/ui/TextInputWithLabel.vue
@@ -6,7 +6,7 @@
{{ note }}
-
+
@@ -24,7 +24,8 @@ export default {
readonly: Boolean,
disabled: Boolean,
inputClass: String,
- showCopy: Boolean
+ showCopy: Boolean,
+ trimWhitespace: Boolean
},
data() {
return {}
diff --git a/client/components/widgets/BookDetailsEdit.vue b/client/components/widgets/BookDetailsEdit.vue
index fa26bcf5..a7af02c8 100644
--- a/client/components/widgets/BookDetailsEdit.vue
+++ b/client/components/widgets/BookDetailsEdit.vue
@@ -3,10 +3,10 @@