diff --git a/packages/nc-gui/components/smartsheet/Grid.vue b/packages/nc-gui/components/smartsheet/Grid.vue
index 049ea163a8..09a9dd5b36 100644
--- a/packages/nc-gui/components/smartsheet/Grid.vue
+++ b/packages/nc-gui/components/smartsheet/Grid.vue
@@ -156,8 +156,8 @@ const getContainerScrollForElement = (
relativePos.right + (offset?.right || 0) > 0
? container.scrollLeft + relativePos.right + (offset?.right || 0)
: relativePos.left - (offset?.left || 0) < 0
- ? container.scrollLeft + relativePos.left - (offset?.left || 0)
- : container.scrollLeft
+ ? container.scrollLeft + relativePos.left - (offset?.left || 0)
+ : container.scrollLeft
/*
* If the element is below the container, scroll down (positive)
@@ -167,8 +167,8 @@ const getContainerScrollForElement = (
relativePos.bottom + (offset?.bottom || 0) > 0
? container.scrollTop + relativePos.bottom + (offset?.bottom || 0)
: relativePos.top - (offset?.top || 0) < 0
- ? container.scrollTop + relativePos.top - (offset?.top || 0)
- : container.scrollTop
+ ? container.scrollTop + relativePos.top - (offset?.top || 0)
+ : container.scrollTop
return scroll
}
@@ -418,7 +418,18 @@ async function clearCell(ctx: { row: number; col: number } | null, skipUpdate =
return
}
- rowObj.row[columnObj.title] = null
+ // handle Checkbox and rating fields in a special way
+ switch (columnObj.uidt) {
+ case UITypes.Checkbox:
+ rowObj.row[columnObj.title] = false
+ break
+ case UITypes.Rating:
+ rowObj.row[columnObj.title] = 0
+ break
+ default:
+ rowObj.row[columnObj.title] = null
+ break
+ }
if (!skipUpdate) {
// update/save cell value
@@ -661,104 +672,105 @@ const closeAddColumnDropdown = () => {
@contextmenu="showContextMenu"
>
-
-
-
+
+
+
+
+
-
-
+
+
-
+
+
+
+
-