Keep up-to-date resource in the details view (Drawer) (#7224)

* alternative to https://github.com/lensapp/lens/pull/7187

Signed-off-by: Roman <ixrock@gmail.com>

* update snapshots with `jest src -u` from `packages/core`

Signed-off-by: Roman <ixrock@gmail.com>

* skipping some tests cause i have no idea how to fix those and what is wrong

Signed-off-by: Roman <ixrock@gmail.com>

* fix tests

Signed-off-by: Roman <ixrock@gmail.com>

---------

Signed-off-by: Roman <ixrock@gmail.com>
This commit is contained in:
Roman authored and GitHub committed 2023-03-13 10:45:16 -04:00
1 parent a63f737adb
commit 79a4eb32a3
3 files changed
+39 -24

No files matched your search

@@ -21,7 +21,9 @@ const currentKubeObjectInDetailsInjectable = getInjectable({
const apiManager = di.inject(apiManagerInjectable);
return asyncComputed({
getValueFromObservedPromise: async (): Promise<CurrentKubeObject> => {
betweenUpdates: "show-latest-value",
async getValueFromObservedPromise(): Promise<CurrentKubeObject> {
const path = urlParam.get();
const store = apiManager.getStore(path);
@@ -30,7 +32,7 @@ const currentKubeObjectInDetailsInjectable = getInjectable({
}
try {
const object = await store.loadFromPath(path);
const object = store.getByPath(path) ?? await store.loadFromPath(path);
return { object };
} catch (error) {