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" >