mirror of
https://github.com/drawdb-io/drawdb.git
synced 2025-09-18 12:52:37 +00:00
Adding a dynamic box for rowsof type primary key
This commit is contained in:
@@ -61,7 +61,7 @@ export default function Table(props) {
|
|||||||
.scrollIntoView({ behavior: "smooth" });
|
.scrollIntoView({ behavior: "smooth" });
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
const primaryKeyCount = tableData.fields.filter(field => field.primary).length;
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<foreignObject
|
<foreignObject
|
||||||
@@ -295,10 +295,15 @@ export default function Table(props) {
|
|||||||
<div
|
<div
|
||||||
className={`
|
className={`
|
||||||
${
|
${
|
||||||
(fieldData.primary && settings.notation !== "default" )
|
(fieldData.primary && settings.notation !== "default" && primaryKeyCount === 1)
|
||||||
? "border-b border-gray-400"
|
? "border-b border-gray-400"
|
||||||
: ""
|
: ""
|
||||||
}${
|
}${
|
||||||
|
(fieldData.primary && settings.notation !== "default" && index ===primaryKeyCount - 1)
|
||||||
|
? "border-b border-gray-400"
|
||||||
|
: ""
|
||||||
|
}
|
||||||
|
${
|
||||||
(!fieldData.primary && settings.notation !== "default" )
|
(!fieldData.primary && settings.notation !== "default" )
|
||||||
? "border-l border-r"
|
? "border-l border-r"
|
||||||
: ""
|
: ""
|
||||||
|
Reference in New Issue
Block a user