mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
fix: Don't crash when hovering hotbar menu index
- Remove all uses of React.ReactNode as it is unsafe, replace them with
usages of SafeReactNode which doesn't contain the '{}' type
Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
1 parent
f13a145a27
commit
9d51ef2aa6
84 files changed
+246
-208
No files matched your search
@@ -33,6 +33,7 @@
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@k8slens/kube-object": "^1.0.0-alpha.1",
|
||||
"@k8slens/utilities": "^1.0.0-alpha.3",
|
||||
"@ogre-tools/injectable": "^15.8.1",
|
||||
"react": "^17.0.2"
|
||||
},
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*/
|
||||
|
||||
import type { KubeObject } from "@k8slens/kube-object";
|
||||
import type { ReactNode } from "react";
|
||||
import type { SafeReactNode } from "@k8slens/utilities";
|
||||
import type { TableSortCallback, SearchFilter, TableCellProps } from "./list-layout-column";
|
||||
|
||||
export interface BaseKubeObjectListLayoutColumn<K extends KubeObject> {
|
||||
@@ -13,7 +13,7 @@ export interface BaseKubeObjectListLayoutColumn<K extends KubeObject> {
|
||||
sortingCallBack?: TableSortCallback<K>;
|
||||
searchFilter?: SearchFilter<K>;
|
||||
header: TableCellProps | undefined | null;
|
||||
content: (item: K) => ReactNode | TableCellProps;
|
||||
content: (item: K) => SafeReactNode | TableCellProps;
|
||||
}
|
||||
|
||||
export interface GeneralKubeObjectListLayoutColumn extends BaseKubeObjectListLayoutColumn<KubeObject> {
|
||||
|
||||
@@ -3,8 +3,7 @@
|
||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||
*/
|
||||
|
||||
import type { ReactNode } from "react";
|
||||
import type { SingleOrMany } from "@k8slens/utilities";
|
||||
import type { SafeReactNode, SingleOrMany } from "@k8slens/utilities";
|
||||
|
||||
export interface ItemObject {
|
||||
getId: () => string;
|
||||
@@ -37,7 +36,7 @@ export interface TableCellProps extends React.DOMAttributes<HTMLDivElement> {
|
||||
/**
|
||||
* The actual value of the cell
|
||||
*/
|
||||
title?: ReactNode;
|
||||
title?: SafeReactNode;
|
||||
|
||||
/**
|
||||
* content inside could be scrolled
|
||||
|
||||
Reference in new issue
Block a user