File tree Expand file tree Collapse file tree 4 files changed +17
-10
lines changed Expand file tree Collapse file tree 4 files changed +17
-10
lines changed Original file line number Diff line number Diff line change 3737 :to =" cardFieldRef"
3838 >
3939 <v-autocomplete
40+ v-if =" showField || settings.fieldOnly"
4041 v-bind =" bindingSettings"
4142 v-model =" modelValue"
4243 :autofocus =" !settings.fieldOnly || settings.autofocus"
@@ -201,7 +202,7 @@ const error = ref<boolean>(false);
201202const items = ref ();
202203const showField = ref <boolean >(false );
203204const timeOpened = ref <TimeOpened >(null );
204- let originalValue = modelValue . value ;
205+ let originalValue = null ;
205206
206207
207208// ------------------------------------------------ Loading //
@@ -226,11 +227,11 @@ const theClearIcon = computed(() => {
226227const displayValue = computed (() => {
227228 if (modelValue .value && modelValue .value [settings .itemTitle as string ]) {
228229 setEmptyValue (false );
229-
230230 return modelValue .value [settings .itemTitle as string ];
231231 }
232232
233233 if (modelValue .value ) {
234+ setEmptyValue (false );
234235 return modelValue .value ;
235236 }
236237
@@ -367,6 +368,8 @@ function toggleField() {
367368 if (closeSiblingsBus !== null && closeSiblings .value && showField .value && ! settings .fieldOnly ) {
368369 closeSiblingsBus .emit (response .timeOpened );
369370 }
371+
372+ originalValue = modelValue .value ;
370373}
371374
372375
Original file line number Diff line number Diff line change @@ -201,7 +201,7 @@ const error = ref<boolean>(false);
201201const items = ref ();
202202const showField = ref <boolean >(false );
203203const timeOpened = ref <TimeOpened >(null );
204- let originalValue = modelValue . value ;
204+ let originalValue = null ;
205205
206206
207207// ------------------------------------------------ Loading //
@@ -226,11 +226,11 @@ const theClearIcon = computed(() => {
226226const displayValue = computed (() => {
227227 if (modelValue .value && modelValue .value [settings .itemTitle as string ]) {
228228 setEmptyValue (false );
229-
230229 return modelValue .value [settings .itemTitle as string ];
231230 }
232231
233232 if (modelValue .value ) {
233+ setEmptyValue (false );
234234 return modelValue .value ;
235235 }
236236
@@ -367,6 +367,8 @@ function toggleField() {
367367 if (closeSiblingsBus !== null && closeSiblings .value && showField .value && ! settings .fieldOnly ) {
368368 closeSiblingsBus .emit (response .timeOpened );
369369 }
370+
371+ originalValue = modelValue .value ;
370372}
371373
372374
Original file line number Diff line number Diff line change @@ -194,7 +194,7 @@ const empty = ref<boolean>(false);
194194const error = ref <boolean >(false );
195195const showField = ref <boolean >(false );
196196const timeOpened = ref <TimeOpened >(null );
197- let originalValue = modelValue . value ;
197+ let originalValue = null ;
198198
199199
200200// ------------------------------------------------ Loading //
@@ -358,6 +358,8 @@ function toggleField() {
358358 if (closeSiblingsBus !== null && closeSiblings .value && showField .value && ! settings .fieldOnly ) {
359359 closeSiblingsBus .emit (response .timeOpened );
360360 }
361+
362+ originalValue = modelValue .value ;
361363}
362364
363365
@@ -434,5 +436,4 @@ onUnmounted(() => {
434436});
435437 </script >
436438
437- <style lang="scss" scoped>
438- </style >
439+ <style lang="scss" scoped></style >
Original file line number Diff line number Diff line change @@ -195,7 +195,7 @@ const empty = ref<boolean>(false);
195195const error = ref <boolean >(false );
196196const showField = ref <boolean >(false );
197197const timeOpened = ref <TimeOpened >(null );
198- let originalValue = modelValue . value ;
198+ let originalValue = null ;
199199
200200
201201// ------------------------------------------------ Loading //
@@ -358,6 +358,8 @@ function toggleField() {
358358 if (closeSiblingsBus !== null && closeSiblings .value && showField .value && ! settings .fieldOnly ) {
359359 closeSiblingsBus .emit (response .timeOpened );
360360 }
361+
362+ originalValue = modelValue .value ;
361363}
362364
363365
@@ -430,5 +432,4 @@ onUnmounted(() => {
430432});
431433 </script >
432434
433- <style lang="scss" scoped>
434- </style >
435+ <style lang="scss" scoped></style >
You can’t perform that action at this time.
0 commit comments