mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
simplify the namespace selector placeholder logic
Signed-off-by: Jim Ehrismann <jehrismann@mirantis.com>
This commit is contained in:
parent
e8a93788b0
commit
6d43dbb8eb
@ -36,9 +36,8 @@ import { isMac } from "../../../common/vars";
|
|||||||
const Placeholder = observer((props: PlaceholderProps<any, boolean>) => {
|
const Placeholder = observer((props: PlaceholderProps<any, boolean>) => {
|
||||||
const getPlaceholder = (): React.ReactNode => {
|
const getPlaceholder = (): React.ReactNode => {
|
||||||
const namespaces = namespaceStore.contextNamespaces;
|
const namespaces = namespaceStore.contextNamespaces;
|
||||||
const length = namespaceStore.selectedNamespaces.length ? namespaces.length : 0;
|
|
||||||
|
|
||||||
switch (length) {
|
switch (namespaceStore.selectedNamespaces.length) {
|
||||||
case 0:
|
case 0:
|
||||||
return <>All namespaces</>;
|
return <>All namespaces</>;
|
||||||
case 1:
|
case 1:
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user