Validate field default values

This commit is contained in:
1ilit
2023-09-19 15:51:21 +03:00
parent 81792a5243
commit 9311c1fbaf
3 changed files with 61 additions and 2 deletions

View File

@@ -389,6 +389,20 @@ export default function Table(props) {
length: 255,
increment: incr,
});
} else if (
f.type === "BLOB" ||
f.type === "JSON" ||
f.type === "GEOMETRY" ||
f.type === "TEXT" ||
incr
) {
updateField(props.tableData.id, j, {
type: value,
increment: incr,
default: "",
length: "",
values: [],
});
} else {
updateField(props.tableData.id, j, {
type: value,
@@ -542,7 +556,7 @@ export default function Table(props) {
/>
</>
)}
{f.type === "VARCHAR" && (
{(f.type === "VARCHAR" || f.type === "CHAR") && (
<>
<div className="font-semibold">Length</div>
<InputNumber