Consolidate way of passing items to ItemListLayout (#4850)

This commit is contained in:
Janne Savolainen authored and GitHub committed 2022-02-11 09:32:14 -05:00
1 parent e626cc91d4
commit 668ac58cb3
5 files changed
+13 -7

No files matched your search

@@ -21,11 +21,14 @@ import { TooltipPosition } from "../tooltip";
import { withInjectables } from "@ogre-tools/injectable-react";
import type { ClusterFrameContext } from "../../cluster-frame-context/cluster-frame-context";
import clusterFrameContextInjectable from "../../cluster-frame-context/cluster-frame-context.injectable";
import kubeWatchApiInjectable
from "../../kube-watch-api/kube-watch-api.injectable";
import kubeWatchApiInjectable from "../../kube-watch-api/kube-watch-api.injectable";
import type { KubeWatchSubscribeStoreOptions } from "../../kube-watch-api/kube-watch-api";
export interface KubeObjectListLayoutProps<K extends KubeObject> extends ItemListLayoutProps<K> {
type ItemListLayoutPropsWithoutGetItems<K extends KubeObject> = Omit<ItemListLayoutProps<K>, "getItems">;
export interface KubeObjectListLayoutProps<K extends KubeObject> extends ItemListLayoutPropsWithoutGetItems<K> {
items?: K[];
getItems?: () => K[];
store: KubeObjectStore<K>;
dependentStores?: KubeObjectStore<KubeObject>[];
subscribeStores?: boolean;