mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
ensure namespace placeholder reflects what will be saved to local storage (#4176)
This commit is contained in:
parent
860f6e2e6d
commit
8cbb4c29d5
@ -37,15 +37,15 @@ const Placeholder = observer((props: PlaceholderProps<any, boolean>) => {
|
||||
const getPlaceholder = (): React.ReactNode => {
|
||||
const namespaces = namespaceStore.contextNamespaces;
|
||||
|
||||
switch (namespaces.length) {
|
||||
case 0:
|
||||
case namespaceStore.allowedNamespaces.length:
|
||||
if (!namespaceStore.selectedNamespaces.length || !namespaces.length) {
|
||||
return <>All namespaces</>;
|
||||
case 1:
|
||||
return <>Namespace: {namespaces[0]}</>;
|
||||
default:
|
||||
return <>Namespaces: {namespaces.join(", ")}</>;
|
||||
}
|
||||
|
||||
if (namespaces.length === 1) {
|
||||
return <>Namespace: {namespaces[0]}</>;
|
||||
}
|
||||
|
||||
return <>Namespaces: {namespaces.join(", ")}</>;
|
||||
};
|
||||
|
||||
return (
|
||||
|
||||
Loading…
Reference in New Issue
Block a user