diff --git a/src/components/EditorCanvas/Table.jsx b/src/components/EditorCanvas/Table.jsx
index 1e656f9a..91600b39 100644
--- a/src/components/EditorCanvas/Table.jsx
+++ b/src/components/EditorCanvas/Table.jsx
@@ -354,7 +354,7 @@ export default function Table(props) {
icon={}
onClick={() => deleteField(fieldData, tableData.id)}
/>
- ) : (
+ ) : settings.showDataTypes ? (
{fieldData.primary && }
{!fieldData.notNull && ?}
@@ -362,13 +362,14 @@ export default function Table(props) {
{fieldData.type +
((dbToTypes[database][fieldData.type].isSized ||
dbToTypes[database][fieldData.type].hasPrecision) &&
- fieldData.size &&
- fieldData.size !== ""
- ? "(" + fieldData.size + ")"
+ fieldData.size &&
+ fieldData.size !== ""
+ ? `(${fieldData.size})`
: "")}
- )}
+ ) : null
+ }
);
diff --git a/src/components/EditorHeader/ControlPanel.jsx b/src/components/EditorHeader/ControlPanel.jsx
index 40afb068..47ed69dc 100644
--- a/src/components/EditorHeader/ControlPanel.jsx
+++ b/src/components/EditorHeader/ControlPanel.jsx
@@ -1211,6 +1211,15 @@ export default function ControlPanel({
function: resetView,
shortcut: "Ctrl+R",
},
+ show_datatype: {
+ state: settings.showDataTypes ? (
+
+ ) : (
+
+ ),
+ function: () =>
+ setSettings((prev) => ({ ...prev, showDataTypes: !prev.showDataTypes })),
+ },
show_grid: {
state: settings.showGrid ? (
diff --git a/src/context/SettingsContext.jsx b/src/context/SettingsContext.jsx
index 3c70f6db..19cd69ec 100644
--- a/src/context/SettingsContext.jsx
+++ b/src/context/SettingsContext.jsx
@@ -5,6 +5,7 @@ const defaultSettings = {
strictMode: false,
showFieldSummary: true,
showGrid: true,
+ showDataTypes: true,
mode: "light",
autosave: true,
panning: true,
diff --git a/src/i18n/locales/en.js b/src/i18n/locales/en.js
index f4e6886a..22d0f54f 100644
--- a/src/i18n/locales/en.js
+++ b/src/i18n/locales/en.js
@@ -49,6 +49,7 @@ const en = {
field_details: "Field details",
reset_view: "Reset view",
show_grid: "Show grid",
+ show_datatype: "Show datatype",
show_cardinality: "Show cardinality",
theme: "Theme",
light: "Light",