}
- type="tertiary"
+ icon={
}
size="small"
+ theme="solid"
style={{
+ backgroundColor: "#2f68ad",
opacity: "0.7",
- backgroundColor: "grey",
- color: "white",
+ marginRight: "6px",
+ }}
+ onClick={() => {
+ if (!layout.sidebar) {
+ setSelectedElement((prev) => ({
+ ...prev,
+ element: ObjectType.TABLE,
+ id: props.tableData.id,
+ open: true,
+ }));
+ } else {
+ setSelectedElement((prev) => ({
+ ...prev,
+ currentTab: Tab.TABLES,
+ element: ObjectType.TABLE,
+ id: props.tableData.id,
+ open: true,
+ }));
+ if (selectedElement.currentTab !== Tab.TABLES) return;
+ document
+ .getElementById(`scroll_table_${props.tableData.id}`)
+ .scrollIntoView({ behavior: "smooth" });
+ }
}}
/>
-
+
+
+
Comment :{" "}
+ {props.tableData.comment === "" ? (
+ "No comment"
+ ) : (
+
{props.tableData.comment}
+ )}
+
+
+
+ Indices :
+ {" "}
+ {props.tableData.indices.length === 0 ? (
+ "No indices"
+ ) : (
+
+ {props.tableData.indices.map((index, k) => (
+
+
+
+ {index.fields.map((f) => (
+
+ {f}
+
+ ))}
+
+
+ ))}
+
+ )}
+
+ }
+ type="danger"
+ block
+ style={{ marginTop: "8px" }}
+ onClick={() => {
+ Toast.success(`Table deleted!`);
+ deleteTable(props.tableData.id);
+ }}
+ >
+ Delete table
+
+
+ }
+ position="rightTop"
+ showArrow
+ trigger="click"
+ style={{ width: "200px" }}
+ >
+
}
+ type="tertiary"
+ size="small"
+ style={{
+ opacity: "0.7",
+ backgroundColor: "grey",
+ color: "white",
+ }}
+ />
+
+