1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00
Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
This commit is contained in:
Jari Kolehmainen 2021-04-19 21:00:51 +03:00
parent 0f7acdaaab
commit b0e673e3b0

View File

@ -4,7 +4,7 @@ import { hotbarStore } from "../../../common/hotbar-store";
import { CommandOverlay } from "../command-palette";
import { Input, InputValidator } from "../input";
const uniqueWorkspaceName: InputValidator = {
const uniqueHotbarName: InputValidator = {
condition: ({ required }) => required,
message: () => `Hotbar with this name already exists`,
validate: value => !hotbarStore.getByName(value),
@ -35,7 +35,7 @@ export class HotbarAddCommand extends React.Component {
autoFocus={true}
theme="round-black"
data-test-id="command-palette-hotbar-add-name"
validators={[uniqueWorkspaceName]}
validators={[uniqueHotbarName]}
onSubmit={(v) => this.onSubmit(v)}
dirty={true}
showValidationLine={true} />