diff --git a/src/renderer/components/+namespaces/namespace-details.tsx b/src/renderer/components/+namespaces/namespace-details.tsx index f61db41711..ee051977e5 100644 --- a/src/renderer/components/+namespaces/namespace-details.tsx +++ b/src/renderer/components/+namespaces/namespace-details.tsx @@ -25,7 +25,7 @@ import React from "react"; import { computed, makeObservable, observable, reaction } from "mobx"; import { disposeOnUnmount, observer } from "mobx-react"; import { DrawerItem } from "../drawer"; -import { cssNames } from "../../utils"; +import { boundMethod, cssNames } from "../../utils"; import { getMetricsForNamespace, IPodMetrics, Namespace } from "../../api/endpoints"; import { getDetailsUrl, KubeObjectDetailsProps } from "../kube-object"; import { Link } from "react-router-dom"; @@ -72,6 +72,7 @@ export class NamespaceDetails extends React.Component { return limitRangeStore.getAllByNs(namespace); } + @boundMethod async loadMetrics() { this.metrics = await getMetricsForNamespace(this.props.object.getName(), ""); } diff --git a/src/renderer/components/input/input.tsx b/src/renderer/components/input/input.tsx index 91b58c24b5..062d61f2c6 100644 --- a/src/renderer/components/input/input.tsx +++ b/src/renderer/components/input/input.tsx @@ -328,6 +328,8 @@ export class Input extends React.Component { multiLine, showValidationLine, validators, theme, maxRows, children, showErrorsAsTooltip, maxLength, rows, disabled, autoSelectOnFocus, iconLeft, iconRight, contentRight, id, dirty: _dirty, // excluded from passing to input-element + defaultValue, + trim, ...inputProps } = this.props; const { focused, dirty, valid, validating, errors } = this.state;