Fix incorrect default values and server response in list creation UI
This commit is contained in:
parent
0f055eacb8
commit
1ef1c5a61c
|
@ -107,7 +107,7 @@ func handleCreateList(c echo.Context) error {
|
||||||
// Hand over to the GET handler to return the last insertion.
|
// Hand over to the GET handler to return the last insertion.
|
||||||
c.SetParamNames("id")
|
c.SetParamNames("id")
|
||||||
c.SetParamValues(fmt.Sprintf("%d", newID))
|
c.SetParamValues(fmt.Sprintf("%d", newID))
|
||||||
return c.JSON(http.StatusOK, handleGetLists(c))
|
return handleGetLists(c)
|
||||||
}
|
}
|
||||||
|
|
||||||
// handleUpdateList handles list modification.
|
// handleUpdateList handles list modification.
|
||||||
|
|
|
@ -67,9 +67,9 @@ export default Vue.extend({
|
||||||
// Binds form input values.
|
// Binds form input values.
|
||||||
form: {
|
form: {
|
||||||
name: '',
|
name: '',
|
||||||
type: '',
|
type: 'private',
|
||||||
optin: '',
|
optin: 'single',
|
||||||
tags: '',
|
tags: [],
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
@ -114,7 +114,7 @@ export default Vue.extend({
|
||||||
},
|
},
|
||||||
|
|
||||||
mounted() {
|
mounted() {
|
||||||
this.form = { ...this.$props.data };
|
this.form = { ...this.form, ...this.$props.data };
|
||||||
|
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$refs.focus.focus();
|
this.$refs.focus.focus();
|
||||||
|
|
Loading…
Reference in New Issue