Pass uniqueId to instance key to create new model every

time release details opened

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
This commit is contained in:
Alex Andreev committed 2023-02-15 14:48:22 +03:00
1 parent eddb5bdb56
commit 416ec1fdf8
1 file changed
+2 -1
@@ -31,6 +31,7 @@ import assert from "assert";
import activeThemeInjectable from "../../../../themes/active.injectable";
import type { ToHelmRelease } from "../../to-helm-release.injectable";
import toHelmReleaseInjectable from "../../to-helm-release.injectable";
import uniqueId from "lodash/uniqueId";
const releaseDetailsModelInjectable = getInjectable({
id: "release-details-model",
@@ -56,7 +57,7 @@ const releaseDetailsModelInjectable = getInjectable({
},
lifecycle: lifecycleEnum.keyedSingleton({
getInstanceKey: (di, release: TargetHelmRelease) => `${release.namespace}/${release.name}`,
getInstanceKey: (di, release: TargetHelmRelease) => `${release.namespace}/${release.name}-${uniqueId()}`,
}),
});