1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

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 2023-02-15 14:48:22 +03:00
parent eddb5bdb56
commit 416ec1fdf8

View File

@ -31,6 +31,7 @@ import assert from "assert";
import activeThemeInjectable from "../../../../themes/active.injectable"; import activeThemeInjectable from "../../../../themes/active.injectable";
import type { ToHelmRelease } from "../../to-helm-release.injectable"; import type { ToHelmRelease } from "../../to-helm-release.injectable";
import toHelmReleaseInjectable from "../../to-helm-release.injectable"; import toHelmReleaseInjectable from "../../to-helm-release.injectable";
import uniqueId from "lodash/uniqueId";
const releaseDetailsModelInjectable = getInjectable({ const releaseDetailsModelInjectable = getInjectable({
id: "release-details-model", id: "release-details-model",
@ -56,7 +57,7 @@ const releaseDetailsModelInjectable = getInjectable({
}, },
lifecycle: lifecycleEnum.keyedSingleton({ lifecycle: lifecycleEnum.keyedSingleton({
getInstanceKey: (di, release: TargetHelmRelease) => `${release.namespace}/${release.name}`, getInstanceKey: (di, release: TargetHelmRelease) => `${release.namespace}/${release.name}-${uniqueId()}`,
}), }),
}); });