π₯ π₯ π₯ A Free & Self-hostable Airtable Alternative
TypeScript airtableairtable-alternativeautomatic-apihacktoberfestlow-codeno-codeno-code-databaseno-code-platformpostgresqlrest-apirestful-apispreadsheetsqliteswagger
fix(nc-gui): dont show grid row drag and row selection option in mobile view
Ramesh Maned0711c75bcab
diff --git a/packages/nc-gui/components/smartsheet/grid/canvas/composables/useCanvasRender.ts b/packages/nc-gui/components/smartsheet/grid/canvas/composables/useCanvasRender.tsindex 9e5e57d9cd..33fd723254 100644--- a/packages/nc-gui/components/smartsheet/grid/canvas/composables/useCanvasRender.ts+++ b/packages/nc-gui/components/smartsheet/grid/canvas/composables/useCanvasRender.ts@@ -581,6 +581,7 @@ export function useCanvasRender({if (column.id === 'row_number') {if (!readOnly.value &&+ !isMobileMode.value &&(isSelectedAllRecords.value || isBoxHovered({ x: 0, y: 0, width: canvasWidth, height: 32 }, mousePosition)) &&!isGroupBy.value) {@@ -907,7 +908,7 @@ export function useCanvasRender({/*** 1. Render row index*/- if (readOnly.value || !(isHover || isChecked || isRowCellSelected)) {+ if (readOnly.value || isMobileMode.value || !(isHover || isChecked || isRowCellSelected)) {let rowIndexFontSize = '13px'if (row.rowMeta.rowIndex! + 1 >= 1000) {@@ -973,7 +974,7 @@ export function useCanvasRender({/*** 3. Render checkbox*/- if (!readOnly.value && (isChecked || isHover || isRowCellSelected)) {+ if (!isMobileMode.value && !readOnly.value && (isChecked || isHover || isRowCellSelected)) {const isCheckboxHovered = isHover && mousePosition.x >= currentX && mousePosition.x <= currentX + 24 && !isDisabledrenderCheckbox(ctx,diff --git a/packages/nc-gui/components/smartsheet/grid/canvas/composables/useCanvasTable.ts b/packages/nc-gui/components/smartsheet/grid/canvas/composables/useCanvasTable.tsindex a1f75ba8dc..fd45feaeb5 100644--- a/packages/nc-gui/components/smartsheet/grid/canvas/composables/useCanvasTable.ts+++ b/packages/nc-gui/components/smartsheet/grid/canvas/composables/useCanvasTable.ts@@ -300,7 +300,7 @@ export function useCanvasTable({const isFieldEditAllowed = computed(() => isUIAllowed('fieldAdd'))- const isRowDraggingEnabled = computed(() => isOrderColumnExists.value && !isRowReorderDisabled.value)+ const isRowDraggingEnabled = computed(() => isOrderColumnExists.value && !isRowReorderDisabled.value && !isMobileMode.value)const isAddingEmptyRowAllowed = computed(() => isDataEditAllowed.value && !meta.value?.synced)diff --git a/packages/nc-gui/components/smartsheet/grid/canvas/index.vue b/packages/nc-gui/components/smartsheet/grid/canvas/index.vueindex 6804e789a4..0265e17d34 100644--- a/packages/nc-gui/components/smartsheet/grid/canvas/index.vue+++ b/packages/nc-gui/components/smartsheet/grid/canvas/index.vue@@ -794,7 +794,8 @@ function extractHoverMetaColRegions(row: Row, group?: CanvasGroup) {const isChecked = isRecordSelected(row)- const isCheckboxDisabled = (!vSelectedAllRecords.value && !isChecked && isAtMaxSelection) || readOnly.value+ const isCheckboxDisabled =+ (!vSelectedAllRecords.value && !isChecked && isAtMaxSelection) || readOnly.value || isMobileMode.valueconst path = group ? generateGroupPath(group) : []@@ -812,7 +813,7 @@ function extractHoverMetaColRegions(row: Row, group?: CanvasGroup) {const rowColouringBoxTotalWidth = rowColouringBorderWidth.value ? rowColouringBorderWidth.value + 8 : 0- if (readOnly.value || !(isHover || isChecked || isRowCellSelected)) {+ if (readOnly.value || isMobileMode.value || !(isHover || isChecked || isRowCellSelected)) {regions.push({x: currentX,width: rowMetaColumnWidth.value / 2 - 8,@@ -832,7 +833,7 @@ function extractHoverMetaColRegions(row: Row, group?: CanvasGroup) {currentX += 6}- if (!readOnly.value && (isChecked || isHover || isRowCellSelected) && !isPublicView.value) {+ if (!readOnly.value && !isMobileMode.value && (isChecked || isHover || isRowCellSelected) && !isPublicView.value) {regions.push({x: currentX,width: 20,