Fix input default value warning (#3497)

* Removing some props from passing to <input/>

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>

* Fixing ns loadMetrics() this context

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
This commit is contained in:
Alex Andreev authored and GitHub committed 2021-07-23 07:36:48 -04:00
1 parent 823d68014e
commit 44fad7f459
2 files changed
+4 -1

No files matched your search

@@ -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<Props> {
return limitRangeStore.getAllByNs(namespace);
}
@boundMethod
async loadMetrics() {
this.metrics = await getMetricsForNamespace(this.props.object.getName(), "");
}
+2
View File
@@ -328,6 +328,8 @@ export class Input extends React.Component<InputProps, State> {
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;