We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8803f33 commit 1d013c0Copy full SHA for 1d013c0
src/plugin/components/fields/VSFCustom/VSFCustom.vue
@@ -47,6 +47,7 @@ const settings = inject<Ref<Settings>>('settings')!;
47
48
const FieldLabelComponent = toRaw(FieldLabel);
49
const fieldValidateOn = computed(() => field.value?.validateOn ?? settings.value.validateOn);
50
+const originalValue = modelValue.value;
51
52
53
const $useField = useField(
@@ -61,6 +62,13 @@ const $useField = useField(
61
62
},
63
);
64
65
+onUnmounted(() => {
66
+ if (!settings.value.keepValuesOnUnmount) {
67
+ modelValue.value = originalValue;
68
+ $useField.setValue(originalValue);
69
+ }
70
+});
71
+
72
73
// ------------------------- Validate On Actions //
74
async function onActions(action: ValidateAction): Promise<void> {
0 commit comments