We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 244150f commit 181273cCopy full SHA for 181273c
stubs/inertia/resources/js/Pages/Profile/UpdateProfileInformationForm.vue
@@ -111,7 +111,8 @@
111
112
this.form.post(route('user-profile-information.update'), {
113
errorBag: 'updateProfileInformation',
114
- preserveScroll: true
+ preserveScroll: true,
115
+ onSuccess: () => (this.clearPhotoFileInput()),
116
});
117
},
118
@@ -132,9 +133,18 @@
132
133
deletePhoto() {
134
this.$inertia.delete(route('current-user-photo.destroy'), {
135
preserveScroll: true,
- onSuccess: () => (this.photoPreview = null),
136
+ onSuccess: () => {
137
+ this.photoPreview = null;
138
+ this.clearPhotoFileInput();
139
+ },
140
141
142
+
143
+ clearPhotoFileInput() {
144
+ if (this.$refs.photo?.value) {
145
+ this.$refs.photo.value = null;
146
+ }
147
148
149
}
150
</script>
0 commit comments