Add SystemName validation to AccessibleNamespaces (#2754)

- Don't validate after a submit

Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
Sebastian Malton authored and GitHub committed 2021-07-12 16:13:24 -04:00
1 parent c6618bde88
commit 485783167d
4 files changed
+92 -50

No files matched your search

@@ -25,6 +25,7 @@ import type { Cluster } from "../../../../main/cluster";
import { SubTitle } from "../../layout/sub-title";
import { EditableList } from "../../editable-list";
import { observable, makeObservable } from "mobx";
import { systemName } from "../../input/input_validators";
interface Props {
cluster: Cluster;
@@ -49,6 +50,7 @@ export class ClusterAccessibleNamespaces extends React.Component<Props> {
this.namespaces.add(newNamespace);
this.props.cluster.accessibleNamespaces = Array.from(this.namespaces);
}}
validators={systemName}
items={Array.from(this.namespaces)}
remove={({ oldItem: oldNamesapce }) => {
this.namespaces.delete(oldNamesapce);