Adding a dynamic box for rowsof type primary key

This commit is contained in:
HansMarcus01 2025-03-11 09:35:56 -06:00
parent 0c3b4282ed
commit a6f3f5fd14

View File

@ -61,7 +61,7 @@ export default function Table(props) {
.scrollIntoView({ behavior: "smooth" });
}
};
const primaryKeyCount = tableData.fields.filter(field => field.primary).length;
return (
<>
<foreignObject
@ -295,10 +295,15 @@ export default function Table(props) {
<div
className={`
${
(fieldData.primary && settings.notation !== "default" )
(fieldData.primary && settings.notation !== "default" && primaryKeyCount === 1)
? "border-b border-gray-400"
: ""
}${
(fieldData.primary && settings.notation !== "default" && index ===primaryKeyCount - 1)
? "border-b border-gray-400"
: ""
}
${
(!fieldData.primary && settings.notation !== "default" )
? "border-l border-r"
: ""