Skip to content

πŸ”₯ πŸ”₯ πŸ”₯ A Free & Self-hostable Airtable Alternative

fix(nc-gui): ai review changes

Ramesh Maneaeb4b899e5da
diff --git a/packages/nc-gui/components/smartsheet/grid/canvas/cells/Button/index.ts b/packages/nc-gui/components/smartsheet/grid/canvas/cells/Button/index.ts
index 8ec2cddbbe..2c35ad561b 100644
--- a/packages/nc-gui/components/smartsheet/grid/canvas/cells/Button/index.ts
+++ b/packages/nc-gui/components/smartsheet/grid/canvas/cells/Button/index.ts
@@ -298,9 +298,7 @@ export const ButtonCellRenderer: CellRenderer = {
if (e.key === 'Enter') {
const isLoading = actionManager.isLoading(pk, column.id!)
- if (column.readonly || column.columnObj?.readonly || isLoading) {
- return false
- }
+ if (column.readonly || column.columnObj?.readonly || isLoading) return false
await actionManager.executeButtonAction([pk], column, { row: [row], path, allowLocalUrl })
return true
diff --git a/packages/nc-gui/lang/en.json b/packages/nc-gui/lang/en.json
index 70a2e16292..ba12ab4db2 100644
--- a/packages/nc-gui/lang/en.json
+++ b/packages/nc-gui/lang/en.json
@@ -2005,6 +2005,7 @@
"manageConnections": "Manage connections for your integrations.",
"invalidConfiguration": "Invalid button configuration",
"invalidColumnConfiguration": "Invalid field configuration",
+ "buttonTypeIsMissing": "Button type is missing",
"invalidTheme": "Select a valid theme",
"invalidColor": "Select a valid color",
"invalidType": "Button type can be either 'webhook' or 'url'",
diff --git a/packages/nc-gui/utils/columnUtils.ts b/packages/nc-gui/utils/columnUtils.ts
index 67e58f57aa..31e55a30d5 100644
--- a/packages/nc-gui/utils/columnUtils.ts
+++ b/packages/nc-gui/utils/columnUtils.ts
@@ -341,7 +341,7 @@ const isColumnInvalid = ({
}
} else if (!colOptions.type) {
result.isInvalid = true
- result.tooltip = 'msg.invalidColumnConfiguration'
+ result.tooltip = 'msg.buttonTypeIsMissing'
}
break
}