Skip to content

Commit cb5a9c7

Browse files
committed
Form component: Reset form only on post requests.
This is the first attempt to fix #304.
1 parent 8d77734 commit cb5a9c7

File tree

3 files changed

+10
-5
lines changed

3 files changed

+10
-5
lines changed

app/concepts/matestack/ui/core/form/form.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,8 +126,11 @@ const componentDef = {
126126
self.$store.dispatch('navigateTo', {url: path, backwards: false})
127127
return;
128128
}
129-
self.setProps(self.data, null);
130-
self.initValues()
129+
if (self.componentConfig["method"] == "post")
130+
{
131+
self.setProps(self.data, null);
132+
self.initValues();
133+
}
131134
self.showInlineForm = false;
132135
})
133136
.catch(function(error){

vendor/assets/javascripts/matestack-ui-core.js

Lines changed: 4 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/assets/javascripts/matestack-ui-core.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)