comments for fields
This commit is contained in:
parent
e3bed1d789
commit
4bf37c143c
@ -173,6 +173,7 @@ export default function Canvas(props) {
|
|||||||
unique: true,
|
unique: true,
|
||||||
notNull: true,
|
notNull: true,
|
||||||
increment: true,
|
increment: true,
|
||||||
|
comment: "",
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
comment: "",
|
comment: "",
|
||||||
|
@ -92,6 +92,7 @@ export default function EditorPanel(props) {
|
|||||||
unique: true,
|
unique: true,
|
||||||
notNull: true,
|
notNull: true,
|
||||||
increment: true,
|
increment: true,
|
||||||
|
comment: "",
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
comment: "",
|
comment: "",
|
||||||
@ -149,6 +150,7 @@ export default function EditorPanel(props) {
|
|||||||
unique: true,
|
unique: true,
|
||||||
notNull: true,
|
notNull: true,
|
||||||
increment: true,
|
increment: true,
|
||||||
|
comment: "",
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
comment: "",
|
comment: "",
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { React, useState } from "react";
|
import { React, useState } from "react";
|
||||||
import {sqlDataTypes} from "../data/data";
|
import { sqlDataTypes } from "../data/data";
|
||||||
import {
|
import {
|
||||||
IconEdit,
|
IconEdit,
|
||||||
IconDelete,
|
IconDelete,
|
||||||
@ -33,6 +33,7 @@ export default function Table(props) {
|
|||||||
unique: false,
|
unique: false,
|
||||||
notNull: false,
|
notNull: false,
|
||||||
increment: false,
|
increment: false,
|
||||||
|
comment: "",
|
||||||
});
|
});
|
||||||
|
|
||||||
const handleEditField = () => {
|
const handleEditField = () => {
|
||||||
@ -50,6 +51,7 @@ export default function Table(props) {
|
|||||||
unique: false,
|
unique: false,
|
||||||
notNull: false,
|
notNull: false,
|
||||||
increment: false,
|
increment: false,
|
||||||
|
comment: "",
|
||||||
});
|
});
|
||||||
setEditFieldVisible(-1);
|
setEditFieldVisible(-1);
|
||||||
};
|
};
|
||||||
@ -71,6 +73,7 @@ export default function Table(props) {
|
|||||||
unique: false,
|
unique: false,
|
||||||
notNull: false,
|
notNull: false,
|
||||||
increment: false,
|
increment: false,
|
||||||
|
comment: "",
|
||||||
});
|
});
|
||||||
setVisible(false);
|
setVisible(false);
|
||||||
};
|
};
|
||||||
@ -200,6 +203,10 @@ export default function Table(props) {
|
|||||||
<strong>Default :</strong>{" "}
|
<strong>Default :</strong>{" "}
|
||||||
{e.default === "" ? "Not set" : e.default}
|
{e.default === "" ? "Not set" : e.default}
|
||||||
</p>
|
</p>
|
||||||
|
<p className="text-slate-600">
|
||||||
|
<strong>Comment :</strong>{" "}
|
||||||
|
{e.default === "" ? "Not comment" : e.comment}
|
||||||
|
</p>
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
position="right"
|
position="right"
|
||||||
@ -282,7 +289,9 @@ export default function Table(props) {
|
|||||||
);
|
);
|
||||||
})}
|
})}
|
||||||
<div className="h-[36px] p-2">
|
<div className="h-[36px] p-2">
|
||||||
{ props.tableData.comment===""? "No comment": props.tableData.comment}
|
{props.tableData.comment === ""
|
||||||
|
? "No comment"
|
||||||
|
: props.tableData.comment}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</foreignObject>
|
</foreignObject>
|
||||||
@ -325,6 +334,7 @@ export default function Table(props) {
|
|||||||
};
|
};
|
||||||
})}
|
})}
|
||||||
></Form.Select>
|
></Form.Select>
|
||||||
|
<Form.Input field="comment" label="Comment" className="w-full" />
|
||||||
<div className="flex justify-around mt-2">
|
<div className="flex justify-around mt-2">
|
||||||
<Checkbox
|
<Checkbox
|
||||||
value="primary"
|
value="primary"
|
||||||
@ -426,6 +436,16 @@ export default function Table(props) {
|
|||||||
: ""
|
: ""
|
||||||
}
|
}
|
||||||
></Form.Select>
|
></Form.Select>
|
||||||
|
<Form.Input
|
||||||
|
field="comment"
|
||||||
|
label="Comment"
|
||||||
|
trigger="blur"
|
||||||
|
initValue={
|
||||||
|
editFieldVisible !== -1
|
||||||
|
? props.tableData.fields[editFieldVisible].comment
|
||||||
|
: ""
|
||||||
|
}
|
||||||
|
/>
|
||||||
<div className="flex justify-around mt-2">
|
<div className="flex justify-around mt-2">
|
||||||
<Checkbox
|
<Checkbox
|
||||||
value="primary"
|
value="primary"
|
||||||
|
Loading…
Reference in New Issue
Block a user