Skip to content
Snippets Groups Projects
Commit a648ca21 authored by Timothee P's avatar Timothee P :sunflower:
Browse files

fix error if form is null & fix filtered features opens on first feature

parent 97aaaa6b
No related branches found
No related tags found
No related merge requests found
...@@ -47,7 +47,6 @@ export default { ...@@ -47,7 +47,6 @@ export default {
selectedStatus: { selectedStatus: {
get() { get() {
return this.statusObject; return this.statusObject;
}, },
set(newValue) { set(newValue) {
this.$store.commit('feature/UPDATE_FORM_FIELD', { name: 'status', value: newValue.value }); this.$store.commit('feature/UPDATE_FORM_FIELD', { name: 'status', value: newValue.value });
......
...@@ -218,7 +218,7 @@ ...@@ -218,7 +218,7 @@
params: { params: {
slug_type_signal: feature.feature_type.slug, slug_type_signal: feature.feature_type.slug,
}, },
query: queryparams query: { ...queryparams, offset: queryparams.offset + index }
}" }"
> >
{{ feature.title || feature.feature_id }} {{ feature.title || feature.feature_id }}
......
...@@ -190,12 +190,14 @@ export default { ...@@ -190,12 +190,14 @@ export default {
]), ]),
hasUnsavedChange() { hasUnsavedChange() {
if (this.form.title !== this.currentFeature.title) return true; if (this.form) {
if (this.form.description.value !== this.currentFeature.description) return true; if (this.form.title !== this.currentFeature.title) return true;
if (this.form.status.value !== this.currentFeature.status) return true; if (this.form.description.value !== this.currentFeature.description) return true;
for (const xForm of this.$store.state.feature.extra_forms) { if (this.form.status.value !== this.currentFeature.status) return true;
const originalField = this.currentFeature.feature_data.find(el => el.label === xForm.label); for (const xForm of this.$store.state.feature.extra_forms) {
if (originalField && xForm.value !== originalField.value) return true; const originalField = this.currentFeature.feature_data.find(el => el.label === xForm.label);
if (originalField && xForm.value !== originalField.value) return true;
}
} }
return false; return false;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment