diff --git a/src/components/fields/Field_ColorPicker.vue b/src/components/fields/Field_ColorPicker.vue index fef9c9d..2d1043f 100644 --- a/src/components/fields/Field_ColorPicker.vue +++ b/src/components/fields/Field_ColorPicker.vue @@ -70,17 +70,17 @@ import { I_ExtraFields } from "src/interfaces/I_Blueprint" }) export default class Field_ColorPicker extends BaseClass { @Prop({ default: [] }) readonly inputDataBluePrint!: I_ExtraFields - @Prop({ default: null }) readonly inputDataValue!: null|number + @Prop({ default: null }) readonly inputDataValue!: string @Prop() readonly editMode!: boolean @Prop() readonly isNew!: boolean changedInput = false - localInput: null|number = null + localInput = "" @Emit() signalInput () { this.changedInput = true - return this.localInput + return this.localInput.trim() } get inputIcon () { diff --git a/src/components/fields/Field_List.vue b/src/components/fields/Field_List.vue index 5eb38c5..994a4ad 100644 --- a/src/components/fields/Field_List.vue +++ b/src/components/fields/Field_List.vue @@ -99,6 +99,7 @@ import { Component, Emit, Prop, Watch } from "vue-property-decorator" import BaseClass from "src/BaseClass" +import { extend } from "quasar" import { I_ExtraFields } from "src/interfaces/I_Blueprint" @@ -160,7 +161,21 @@ export default class Field_List extends BaseClass { @Emit() signalInput () { this.changedInput = true - return this.localInput + + const dataCopy: { + value: string + affix?: string + }[] = extend(true, [], this.localInput) + + const returnValue = dataCopy.map(e => { + e.value = e.value.trim() + if (e.affix) { + e.affix = e.affix.trim() + } + return e + }) + + return returnValue } addNewInput () { diff --git a/src/components/fields/Field_Tags.vue b/src/components/fields/Field_Tags.vue index e653a68..f74d526 100644 --- a/src/components/fields/Field_Tags.vue +++ b/src/components/fields/Field_Tags.vue @@ -15,7 +15,7 @@ > + color="gunmetal-light" text-color="satin-sheen-gold-light" class="text-weight-medium"> {{input}} @@ -29,7 +29,7 @@ menu-anchor="bottom middle" menu-self="top middle" class="tagSelect" - :options="allTags" + :options="filteredTags" use-input outlined use-chips @@ -38,8 +38,11 @@ new-value-mode="add" multiple v-model="localInput" + @new-value="addNewValue" @input="signalInput" @keydown="signalInput" + error-message="This tag is already present in the selection." + :error="tagAlreadyExists" >