diff --git a/shell/components/ResourceList/index.vue b/shell/components/ResourceList/index.vue index 28e399da67..442143ada4 100644 --- a/shell/components/ResourceList/index.vue +++ b/shell/components/ResourceList/index.vue @@ -96,11 +96,9 @@ export default { const showMasthead = getters[`type-map/optionsFor`](resource).showListMasthead; return { - inStore, schema, hasListComponent, showMasthead: showMasthead === undefined ? true : showMasthead, - resource, extensionType: ExtensionPoint.PANEL, extensionLocation: PanelLocation.RESOURCE_LIST, loadResources: [resource], // List of resources that will be loaded, this could be many (`Workloads`) diff --git a/shell/mixins/resource-fetch-api-pagination.js b/shell/mixins/resource-fetch-api-pagination.js index e73e9b1864..7e548c51f5 100644 --- a/shell/mixins/resource-fetch-api-pagination.js +++ b/shell/mixins/resource-fetch-api-pagination.js @@ -213,10 +213,6 @@ export default { showDynamicRancherNamespaces() { return this.$store.getters['prefs/get'](ALL_NAMESPACES); }, - - inStore() { - return this.$store.getters['currentStore'](this.resource) || this.currentProduct?.inStore; - } }, watch: { diff --git a/shell/mixins/resource-fetch.js b/shell/mixins/resource-fetch.js index 171bb0a4fb..44fe62718e 100644 --- a/shell/mixins/resource-fetch.js +++ b/shell/mixins/resource-fetch.js @@ -31,11 +31,18 @@ export default { perfConfig = DEFAULT_PERF_SETTING; } + // Normally owner components supply `resource` and `inStore` as part of their data, however these are needed here before parent data runs + // So set up both here + const params = { ...this.$route.params }; + const resource = params.resource || this.schema.id; // Resource can either be on a page showing single list, or a page of a resource showing a list of another resource + const inStore = this.$store.getters['currentStore'](resource); + return { + inStore, perfConfig, init: false, multipleResources: [], - loadResources: [this.resource], + loadResources: [resource], // manual refresh vars hasManualRefresh: false, watch: true, @@ -72,6 +79,7 @@ export default { computed: { ...mapGetters({ refreshFlag: 'resource-fetch/refreshFlag' }), + rows() { const currResource = this.fetchedResourceType.find((item) => item.type === this.resource); @@ -92,6 +100,7 @@ export default { return []; }, + loading() { if (this.canPaginate) { return this.paginating;