From 5feb263fb5d76c5623067e58b682c3732176f331 Mon Sep 17 00:00:00 2001 From: Richard Cox Date: Mon, 15 May 2023 11:58:39 +0100 Subject: [PATCH] Don't allow selection of `Not in a Project` --- shell/components/nav/NamespaceFilter.vue | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/shell/components/nav/NamespaceFilter.vue b/shell/components/nav/NamespaceFilter.vue index 9e90e3d7fd1..bd63539518f 100644 --- a/shell/components/nav/NamespaceFilter.vue +++ b/shell/components/nav/NamespaceFilter.vue @@ -96,8 +96,10 @@ export default { // Are we in restricted resource type mode, if so is this an allowed type? if (this.namespaceFilterMode?.length) { const isLastSelected = i.selected && (i.id === ALL || this.value.length === 1); + const kindAllowed = this.namespaceFilterMode.find(f => f === i.kind); + const isNotInProjectGroup = i.id === ALL_ORPHANS; - i.enabled = !isLastSelected && this.namespaceFilterMode.find(f => f === i.kind); + i.enabled = (!isLastSelected && kindAllowed) && !isNotInProjectGroup; } });