mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
keep only items from non-loaded namespaces
Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
This commit is contained in:
1 parent
819b404fc0
commit
71c2bc69d9
1 file changed
+2
-2
@@ -178,10 +178,10 @@ export abstract class KubeObjectStore<T extends KubeObject = any> extends ItemSt
|
||||
|
||||
// update existing items
|
||||
if (!replace) {
|
||||
const partialIds = partialItems.map(item => item.getId());
|
||||
const namespaces = partialItems.map(item => item.getNs());
|
||||
|
||||
items = [
|
||||
...this.items.filter(existingItem => !partialIds.includes(existingItem.getId())),
|
||||
...this.items.filter(existingItem => !namespaces.includes(existingItem.getNs())),
|
||||
...partialItems,
|
||||
];
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user