File tree 4 files changed +17
-10
lines changed
4 files changed +17
-10
lines changed Original file line number Diff line number Diff line change 37
37
:to =" cardFieldRef"
38
38
>
39
39
<v-autocomplete
40
+ v-if =" showField || settings.fieldOnly"
40
41
v-bind =" bindingSettings"
41
42
v-model =" modelValue"
42
43
:autofocus =" !settings.fieldOnly || settings.autofocus"
@@ -201,7 +202,7 @@ const error = ref<boolean>(false);
201
202
const items = ref ();
202
203
const showField = ref <boolean >(false );
203
204
const timeOpened = ref <TimeOpened >(null );
204
- let originalValue = modelValue . value ;
205
+ let originalValue = null ;
205
206
206
207
207
208
// ------------------------------------------------ Loading //
@@ -226,11 +227,11 @@ const theClearIcon = computed(() => {
226
227
const displayValue = computed (() => {
227
228
if (modelValue .value && modelValue .value [settings .itemTitle as string ]) {
228
229
setEmptyValue (false );
229
-
230
230
return modelValue .value [settings .itemTitle as string ];
231
231
}
232
232
233
233
if (modelValue .value ) {
234
+ setEmptyValue (false );
234
235
return modelValue .value ;
235
236
}
236
237
@@ -367,6 +368,8 @@ function toggleField() {
367
368
if (closeSiblingsBus !== null && closeSiblings .value && showField .value && ! settings .fieldOnly ) {
368
369
closeSiblingsBus .emit (response .timeOpened );
369
370
}
371
+
372
+ originalValue = modelValue .value ;
370
373
}
371
374
372
375
Original file line number Diff line number Diff line change @@ -201,7 +201,7 @@ const error = ref<boolean>(false);
201
201
const items = ref ();
202
202
const showField = ref <boolean >(false );
203
203
const timeOpened = ref <TimeOpened >(null );
204
- let originalValue = modelValue . value ;
204
+ let originalValue = null ;
205
205
206
206
207
207
// ------------------------------------------------ Loading //
@@ -226,11 +226,11 @@ const theClearIcon = computed(() => {
226
226
const displayValue = computed (() => {
227
227
if (modelValue .value && modelValue .value [settings .itemTitle as string ]) {
228
228
setEmptyValue (false );
229
-
230
229
return modelValue .value [settings .itemTitle as string ];
231
230
}
232
231
233
232
if (modelValue .value ) {
233
+ setEmptyValue (false );
234
234
return modelValue .value ;
235
235
}
236
236
@@ -367,6 +367,8 @@ function toggleField() {
367
367
if (closeSiblingsBus !== null && closeSiblings .value && showField .value && ! settings .fieldOnly ) {
368
368
closeSiblingsBus .emit (response .timeOpened );
369
369
}
370
+
371
+ originalValue = modelValue .value ;
370
372
}
371
373
372
374
Original file line number Diff line number Diff line change @@ -194,7 +194,7 @@ const empty = ref<boolean>(false);
194
194
const error = ref <boolean >(false );
195
195
const showField = ref <boolean >(false );
196
196
const timeOpened = ref <TimeOpened >(null );
197
- let originalValue = modelValue . value ;
197
+ let originalValue = null ;
198
198
199
199
200
200
// ------------------------------------------------ Loading //
@@ -358,6 +358,8 @@ function toggleField() {
358
358
if (closeSiblingsBus !== null && closeSiblings .value && showField .value && ! settings .fieldOnly ) {
359
359
closeSiblingsBus .emit (response .timeOpened );
360
360
}
361
+
362
+ originalValue = modelValue .value ;
361
363
}
362
364
363
365
@@ -434,5 +436,4 @@ onUnmounted(() => {
434
436
});
435
437
</script >
436
438
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);
195
195
const error = ref <boolean >(false );
196
196
const showField = ref <boolean >(false );
197
197
const timeOpened = ref <TimeOpened >(null );
198
- let originalValue = modelValue . value ;
198
+ let originalValue = null ;
199
199
200
200
201
201
// ------------------------------------------------ Loading //
@@ -358,6 +358,8 @@ function toggleField() {
358
358
if (closeSiblingsBus !== null && closeSiblings .value && showField .value && ! settings .fieldOnly ) {
359
359
closeSiblingsBus .emit (response .timeOpened );
360
360
}
361
+
362
+ originalValue = modelValue .value ;
361
363
}
362
364
363
365
@@ -430,5 +432,4 @@ onUnmounted(() => {
430
432
});
431
433
</script >
432
434
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