Commit 7687d52f authored by Kev's avatar Kev

Add suggestion for refresh methods

parent d4789eae
...@@ -72,12 +72,11 @@ export default { ...@@ -72,12 +72,11 @@ export default {
}, },
methods: { methods: {
handleVulnerabilityStateChange(newState) { refreshHeader() {
if (newState) {
this.$refs.footer.fetchDiscussions();
} else {
this.$refs.header.refreshVulnerability(); this.$refs.header.refreshVulnerability();
} },
refreshFooter() {
this.$refs.footer.fetchDiscussions();
}, },
}, },
}; };
...@@ -88,13 +87,13 @@ export default { ...@@ -88,13 +87,13 @@ export default {
<vulnerability-header <vulnerability-header
ref="header" ref="header"
:initial-vulnerability="vulnerability" :initial-vulnerability="vulnerability"
@vulnerability-state-change="handleVulnerabilityStateChange" @vulnerability-state-change="refreshFooter"
/> />
<vulnerability-details :vulnerability="vulnerability" /> <vulnerability-details :vulnerability="vulnerability" />
<vulnerability-footer <vulnerability-footer
ref="footer" ref="footer"
v-bind="footerInfo" v-bind="footerInfo"
@vulnerability-state-change="handleVulnerabilityStateChange" @vulnerability-state-change="refreshHeader"
/> />
</div> </div>
</template> </template>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment