table settings: disable unique id check in edit mode

This commit is contained in:
Sidney Alcantara
2022-01-10 12:52:27 +11:00
parent 86e97c9b85
commit 0168f18978

View File

@@ -177,14 +177,17 @@ export const tableSettings = (
}.`,
disabled: mode === TableSettingsDialogModes.update,
gridCols: { xs: 12, sm: 6 },
validation: [
[
"test",
"unique",
"Another table exists with this ID",
(value) => !_find(tables, ["value", value]),
],
],
validation:
mode === TableSettingsDialogModes.create
? [
[
"test",
"unique",
"Another table exists with this ID",
(value) => !_find(tables, ["value", value]),
],
]
: [],
},
{
step: "display",