mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
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:
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);
|
||||
|
||||
Reference in new issue
Block a user