Skip to content

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

fix: Canvas grid attachment cell empty in mobile view

Ramesh Mane7ce22019cada
diff --git a/packages/nc-gui/components/smartsheet/grid/canvas/cells/Attachment.ts b/packages/nc-gui/components/smartsheet/grid/canvas/cells/Attachment.ts
index a57eca6689..e1999f9291 100644
--- a/packages/nc-gui/components/smartsheet/grid/canvas/cells/Attachment.ts
+++ b/packages/nc-gui/components/smartsheet/grid/canvas/cells/Attachment.ts
@@ -117,7 +117,7 @@ export const AttachmentCellRenderer: CellRenderer = {
) => {
let attachments: Attachment[] = []
- const rowHeight = pxToRowHeight[height]
+ const rowHeight = pxToRowHeight[height] ?? 1
const verticalPadding = rowHeight === 1 ? 4 : 8
try {
diff --git a/packages/nc-gui/components/smartsheet/grid/canvas/cells/GeoData.ts b/packages/nc-gui/components/smartsheet/grid/canvas/cells/GeoData.ts
index f536bc6061..258b2a3141 100644
--- a/packages/nc-gui/components/smartsheet/grid/canvas/cells/GeoData.ts
+++ b/packages/nc-gui/components/smartsheet/grid/canvas/cells/GeoData.ts
@@ -10,7 +10,7 @@ export const GeoDataCellRenderer: CellRenderer = {
const [latitude, longitude] = (value || '').split(';')
const isLocationSet = !!(latitude && longitude)
const displayText = isLocationSet ? `${latitude}; ${longitude}` : 'Set location'
- const rowHeight = pxToRowHeight[height]
+ const rowHeight = pxToRowHeight[height] ?? 1
const verticalPadding = rowHeight === 1 ? 4 : 8