[vue] Close NEWCHECK expansion panel if no compare data ise set on init
</template>
<script>
+import { mapState } from "vuex";
+
import {
BaselineRunFilter,
BaselineTagFilter,
@@ -279,10 +281,18 @@ export default {
data() {
return {
activeBaselinePanelId: 0,
- activeNewcheckPanelId: -1
+ activeNewcheckPanelId: 0
};
},
+ computed: {
+ ...mapState({
+ cmpData(state) {
+ return state[this.namespace].cmpData;
+ }
+ }),
+ },
+
mounted() {
this.initByUrl();
},
@@ -353,6 +363,11 @@ export default {
Promise.all(results).then(() => {
filters.forEach(filter => filter.afterInit());
this.afterInit();
+
+ // Close NEWCHECK expansion panel if no compare data is set.
+ if (!this.cmpData) {
+ this.activeNewcheckPanelId = -1;
+ }
});
},
