Skip to content

Commit

Permalink
namespace should be from query
Browse files Browse the repository at this point in the history
  • Loading branch information
nir2002 committed Jul 20, 2023
1 parent 31ab3f6 commit c301c95
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import useNavigateWithSearchParams from "../../../hooks/useNavigateWithSearchPar
import { VersionToInstall } from "./VersionToInstall";
import apiService from "../../../API/apiService";
import { isNewerVersion, isNoneEmptyArray } from "../../../utils";
import useCustomSearchParams from "../../../hooks/useCustomSearchParams";

interface InstallChartModalProps {
isOpen: boolean;
Expand Down Expand Up @@ -51,6 +52,8 @@ export const InstallChartModal = ({
context: selectedCluster,
selectedRepo: currentRepoCtx,
} = useParams();
const { searchParamsObject } = useCustomSearchParams();
const { filteredNamespace } = searchParamsObject;
const [namespace, setNamespace] = useState(queryNamespace);
const [releaseName, setReleaseName] = useState(
isInstall ? chartName : _releaseName
Expand Down Expand Up @@ -336,10 +339,11 @@ export const InstallChartModal = ({
isInstall={isInstall}
/>
)}

<GeneralDetails
releaseName={releaseName ?? ""}
disabled={isUpgrade || (!isUpgrade && !isInstall)}
namespace={namespace ? namespace : ""}
namespace={namespace ? namespace : filteredNamespace}
onReleaseNameInput={setReleaseName}
onNamespaceInput={setNamespace}
/>
Expand Down

0 comments on commit c301c95

Please sign in to comment.