Trim whitespace from book/podcast/episode details text inputs #3943

This commit is contained in:
advplyr 2025-02-06 17:27:33 -06:00
parent e93bb5cb07
commit 0bba709124
6 changed files with 38 additions and 22 deletions

View file

@ -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)
},