From ebed7576d8f22bbead0c65cdf00e3c10a85e768a Mon Sep 17 00:00:00 2001 From: Vincent Fiduccia Date: Fri, 13 Mar 2020 15:29:47 -0700 Subject: [PATCH] Fix custom component loading --- components/ResourceDetail.vue | 10 +++++++--- components/SortableTable/index.vue | 2 ++ components/nav/Group.vue | 21 +++++++++++---------- pages/c/_cluster/_resource/index.vue | 11 ++++++----- 4 files changed, 26 insertions(+), 18 deletions(-) diff --git a/components/ResourceDetail.vue b/components/ResourceDetail.vue index 53c2720ebc..f3f3d204b0 100644 --- a/components/ResourceDetail.vue +++ b/components/ResourceDetail.vue @@ -128,7 +128,11 @@ export default { }, data() { - return { currentValue: this.value }; + return { + currentValue: this.value, + detailComponent: this.$store.getters['type-map/importDetail'](this.resource), + editComponent: this.$store.getters['type-map/importEdit'](this.resource), + }; }, computed: { @@ -164,9 +168,9 @@ export default { showComponent() { if ( this.isView && this.hasCustomDetail ) { - return this.$store.getters['type-map/importDetail'](this.resource); + return this.detailComponent; } else if ( !this.isView && this.hasCustomEdit ) { - return this.$store.getters['type-map/importEdit'](this.resource); + return this.editComponent; } return null; diff --git a/components/SortableTable/index.vue b/components/SortableTable/index.vue index 3db7878b04..2cfad9c02e 100644 --- a/components/SortableTable/index.vue +++ b/components/SortableTable/index.vue @@ -228,11 +228,13 @@ export default { availableActions() { return this.$store.getters[`${ this.storeName }/forTable`]; }, + ...mapState({ tableSelected(state) { return state[this.storeName].tableSelected; } }), + classObject() { return { 'top-divider': this.topDivider, 'emphasized-body': this.emphasizedBody, 'body-dividers': this.bodyDividers diff --git a/components/nav/Group.vue b/components/nav/Group.vue index 969a1b11a3..4f278e925f 100644 --- a/components/nav/Group.vue +++ b/components/nav/Group.vue @@ -81,16 +81,17 @@ export default {
  • - +
      + +