ensure namespace placeholder reflects what will be saved to local storage (#4176)

This commit is contained in:
Jim Ehrismann authored and GitHub committed 2021-10-29 08:42:42 -04:00
1 parent 860f6e2e6d
commit 8cbb4c29d5
1 file changed
+7 -7
@@ -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 (