From 63106860816838c411b2eef5c8946d26b6d2b1f4 Mon Sep 17 00:00:00 2001 From: Ramesh Mane <101566080+rameshmane7218@users.noreply.github.com> Date: Tue, 10 Dec 2024 07:28:44 +0000 Subject: [PATCH] fix(nc-gui): line height issue --- packages/nc-gui/components/cell/MultiSelect.vue | 2 +- packages/nc-gui/components/cell/Rating.vue | 2 +- packages/nc-gui/components/cell/User.vue | 2 +- .../nc-gui/components/smartsheet/grid/InfiniteTable.vue | 6 ++++-- packages/nc-gui/components/smartsheet/grid/Table.vue | 6 ++++-- packages/nc-gui/utils/cell.ts | 8 ++++---- 6 files changed, 15 insertions(+), 11 deletions(-) diff --git a/packages/nc-gui/components/cell/MultiSelect.vue b/packages/nc-gui/components/cell/MultiSelect.vue index 19a8d5cde1..8223713743 100644 --- a/packages/nc-gui/components/cell/MultiSelect.vue +++ b/packages/nc-gui/components/cell/MultiSelect.vue @@ -428,7 +428,7 @@ const onFocus = () => { :style="{ 'display': '-webkit-box', 'max-width': '100%', - '-webkit-line-clamp': rowHeightTruncateLines(rowHeight), + '-webkit-line-clamp': rowHeightTruncateLines(rowHeight, true), '-webkit-box-orient': 'vertical', 'overflow': 'hidden', }" diff --git a/packages/nc-gui/components/cell/Rating.vue b/packages/nc-gui/components/cell/Rating.vue index 8aaf4e99ab..9f83625e05 100644 --- a/packages/nc-gui/components/cell/Rating.vue +++ b/packages/nc-gui/components/cell/Rating.vue @@ -72,7 +72,7 @@ watch(rateDomRef, () => { 'padding': isExpandedFormOpen ? '0px 8px' : '0px 2px', 'display': '-webkit-box', 'max-width': '100%', - '-webkit-line-clamp': rowHeightTruncateLines(rowHeight), + '-webkit-line-clamp': rowHeight === 6 ? 5 : rowHeightTruncateLines(rowHeight, true), '-webkit-box-orient': 'vertical', 'overflow': 'hidden', }" diff --git a/packages/nc-gui/components/cell/User.vue b/packages/nc-gui/components/cell/User.vue index 966557ce8f..f324bedd97 100644 --- a/packages/nc-gui/components/cell/User.vue +++ b/packages/nc-gui/components/cell/User.vue @@ -403,7 +403,7 @@ const isCollaborator = (userIdOrEmail) => { :style="{ 'display': '-webkit-box', 'max-width': '100%', - '-webkit-line-clamp': rowHeightTruncateLines(rowHeight), + '-webkit-line-clamp': rowHeightTruncateLines(rowHeight, true), '-webkit-box-orient': 'vertical', 'overflow': 'hidden', }" diff --git a/packages/nc-gui/components/smartsheet/grid/InfiniteTable.vue b/packages/nc-gui/components/smartsheet/grid/InfiniteTable.vue index 1b302fd17f..cc43827cc9 100644 --- a/packages/nc-gui/components/smartsheet/grid/InfiniteTable.vue +++ b/packages/nc-gui/components/smartsheet/grid/InfiniteTable.vue @@ -195,6 +195,8 @@ const onXcResizing = (cn: string | undefined, event: any) => { const size = event.detail.split('px')[0] gridViewCols.value[cn].width = `${normalizedWidth(metaColumnById.value[cn], size)}px` + + refreshFillHandle() } const onXcStartResizing = (cn: string | undefined, event: any) => { @@ -1434,7 +1436,7 @@ const leftOffset = computed(() => { const fillHandleTop = ref() const fillHandleLeft = ref() -const refreshFillHandle = () => { +function refreshFillHandle() { const rowIndex = isNaN(selectedRange.end.row) ? activeCell.row : selectedRange.end.row const colIndex = isNaN(selectedRange.end.col) ? activeCell.col : selectedRange.end.col if (rowIndex !== null && colIndex !== null) { @@ -1896,7 +1898,7 @@ watch(vSelectedAllRecords, (selectedAll) => {