Skip to content

Commit 33673cd

Browse files
committed
cleanup unused code
1 parent 56fd3c4 commit 33673cd

3 files changed

Lines changed: 2 additions & 6 deletions

File tree

resources/js/Pages/Form/Form.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
function submit() {
3737
router.post(
3838
props.endpointUrl,
39-
form.serializedData,
39+
form.data,
4040
{
4141
onStart: () => { loading.value = true },
4242
onFinish: () => { loading.value = false },

resources/js/form/Form.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,6 @@ export class Form implements FormData, CommandFormData, EventTarget {
3939
errors: {},
4040
});
4141

42-
serializedData: FormData['data'];
43-
4442
entityKey: string;
4543
instanceId: string | number | null;
4644
embedKey?: string;
@@ -57,7 +55,6 @@ export class Form implements FormData, CommandFormData, EventTarget {
5755
this.instanceId = instanceId;
5856
this.embedKey = additionalProps?.embedKey;
5957
this.commandKey = additionalProps?.commandKey;
60-
this.serializedData = this.data;
6158
}
6259

6360
get data() {

resources/js/form/components/Form.vue

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
5454
loading.value = true;
5555
56-
return postFn({ ...form.serializedData, ...extraData })
56+
return postFn({ ...form.data, ...extraData })
5757
.catch(error => {
5858
if (error.response?.status === 422) {
5959
props.form.onError(error.response.data.errors ?? {})
@@ -85,7 +85,6 @@
8585
};
8686
8787
props.form.data = data;
88-
props.form.serializedData = data;
8988
}
9089
9190
const title = useTemplateRef<HTMLElement>('title');

0 commit comments

Comments
 (0)