From 2a788d405a8a93ac0e1691d50386f6a156e6e964 Mon Sep 17 00:00:00 2001 From: mertmit Date: Fri, 3 May 2024 20:31:07 +0000 Subject: [PATCH] fix: rating row height --- packages/nc-gui/components/cell/Rating.vue | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/packages/nc-gui/components/cell/Rating.vue b/packages/nc-gui/components/cell/Rating.vue index c189173351..bcc8d5114f 100644 --- a/packages/nc-gui/components/cell/Rating.vue +++ b/packages/nc-gui/components/cell/Rating.vue @@ -22,6 +22,8 @@ const column = inject(ColumnInj)! const readOnly = inject(ReadonlyInj, ref(false)) +const rowHeight = inject(RowHeightInj, ref(undefined)) + const isExpandedFormOpen = inject(IsExpandedFormOpenInj, ref(false))! const ratingMeta = computed(() => { @@ -78,7 +80,15 @@ watch(rateDomRef, () => { :disabled="readOnly" :count="ratingMeta.max" :class="readOnly ? 'pointer-events-none' : ''" - :style="`color: ${ratingMeta.color}; padding: ${isExpandedFormOpen ? '0px 8px' : '0px 2px'};`" + :style="{ + 'color': ratingMeta.color, + 'padding': isExpandedFormOpen ? '0px 8px' : '0px 2px', + 'display': '-webkit-box', + 'max-width': '100%', + '-webkit-line-clamp': rowHeightTruncateLines(rowHeight), + '-webkit-box-orient': 'vertical', + 'overflow': 'hidden', + }" @keydown="onKeyPress" >