mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Improve Table typing and remove annotations on callbacks (#2981)
Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
1 parent
c6a4d55d86
commit
64ac04186b
59 files changed
+487
-482
No files matched your search
@@ -20,7 +20,7 @@
|
||||
*/
|
||||
|
||||
import React from "react";
|
||||
import type { IKubeMetaField, KubeObject } from "../../api/kube-object";
|
||||
import type { KubeMetaField, KubeObject } from "../../api/kube-object";
|
||||
import { DrawerItem, DrawerItemLabels } from "../drawer";
|
||||
import { lookupApiLink } from "../../api/kube-api";
|
||||
import { Link } from "react-router-dom";
|
||||
@@ -30,15 +30,15 @@ import { getDetailsUrl } from "./kube-object-details";
|
||||
|
||||
export interface KubeObjectMetaProps {
|
||||
object: KubeObject;
|
||||
hideFields?: IKubeMetaField[];
|
||||
hideFields?: KubeMetaField[];
|
||||
}
|
||||
|
||||
export class KubeObjectMeta extends React.Component<KubeObjectMetaProps> {
|
||||
static defaultHiddenFields: IKubeMetaField[] = [
|
||||
static defaultHiddenFields: KubeMetaField[] = [
|
||||
"uid", "resourceVersion", "selfLink"
|
||||
];
|
||||
|
||||
isHidden(field: IKubeMetaField): boolean {
|
||||
isHidden(field: KubeMetaField): boolean {
|
||||
const { hideFields = KubeObjectMeta.defaultHiddenFields } = this.props;
|
||||
|
||||
return hideFields.includes(field);
|
||||
|
||||
Reference in new issue
Block a user