diff --git a/packages/nc-gui/components/cell/Checkbox.vue b/packages/nc-gui/components/cell/Checkbox.vue index 155bd454d6..99f003f047 100644 --- a/packages/nc-gui/components/cell/Checkbox.vue +++ b/packages/nc-gui/components/cell/Checkbox.vue @@ -9,6 +9,7 @@ import { getMdiIcon, inject, parseProp, + rowHeightInPx, useBase, useSelectedCellKeyupListener, } from '#imports' @@ -47,6 +48,8 @@ const rowHeight = inject(RowHeightInj, ref()) const isSurveyForm = inject(IsSurveyFormInj, ref(false)) +const isGrid = inject(IsGridInj, ref(false)) + const checkboxMeta = computed(() => { return { icon: { @@ -110,7 +113,9 @@ useSelectedCellKeyupListener(active, (e) => { }" :style="{ height: - isForm || isExpandedFormOpen || isGallery || isEditColumnMenu ? undefined : `max(${(rowHeight || 1) * 1.8}rem, 41px)`, + isGrid && !isForm && !isExpandedFormOpen && !isEditColumnMenu + ? `${!rowHeight || rowHeight === 1 ? rowHeightInPx['1'] - 4 : rowHeightInPx[`${rowHeight}`] - 20}px` + : undefined, }" :tabindex="readOnly ? -1 : 0" @click="onClick(false, $event)" diff --git a/packages/nc-gui/components/cell/ClampedText.vue b/packages/nc-gui/components/cell/ClampedText.vue index d01c6fb0f4..4fe2b84733 100644 --- a/packages/nc-gui/components/cell/ClampedText.vue +++ b/packages/nc-gui/components/cell/ClampedText.vue @@ -6,7 +6,12 @@ const props = defineProps<{ diff --git a/packages/nc-gui/components/cell/Url.vue b/packages/nc-gui/components/cell/Url.vue index 79044138fd..4f94f7924b 100644 --- a/packages/nc-gui/components/cell/Url.vue +++ b/packages/nc-gui/components/cell/Url.vue @@ -104,7 +104,7 @@ watch( :ref="focus" v-model="vModel" :placeholder="isEditColumn ? $t('labels.enterDefaultUrlOptional') : ''" - class="nc-cell-field outline-none text-sm w-full py-1 bg-transparent h-full" + class="nc-cell-field outline-none w-full py-1 bg-transparent h-full" @blur="editEnabled = false" @keydown.down.stop @keydown.left.stop @@ -121,7 +121,7 @@ watch( v-else-if="isValid && !cellUrlOptions?.overlay" no-prefetch no-rel - class="py-1 z-3 text-sm underline hover:opacity-75" + class="py-1 z-3 underline hover:opacity-75 nc-cell-field-link" :to="url" :target="cellUrlOptions?.behavior === 'replace' ? undefined : '_blank'" :tabindex="readOnly ? -1 : 0" @@ -133,7 +133,7 @@ watch( v-else-if="isValid && !disableOverlay && cellUrlOptions?.overlay" no-prefetch no-rel - class="py-1 z-3 w-full h-full text-center !no-underline hover:opacity-75" + class="py-1 z-3 w-full h-full text-center !no-underline hover:opacity-75 nc-cell-field-link" :to="url" :target="cellUrlOptions?.behavior === 'replace' ? undefined : '_blank'" :tabindex="readOnly ? -1 : 0" diff --git a/packages/nc-gui/components/cell/User.vue b/packages/nc-gui/components/cell/User.vue index ec04f34400..67af060c58 100644 --- a/packages/nc-gui/components/cell/User.vue +++ b/packages/nc-gui/components/cell/User.vue @@ -20,6 +20,7 @@ import { isDrawerOrModalExist, onMounted, ref, + rowHeightTruncateLines, useEventListener, useRoles, useSelectedCellKeyupListener, @@ -343,12 +344,11 @@ const filterOption = (input: string, option: any) => {
{ :style="{ 'display': '-webkit-box', 'max-width': '100%', - '-webkit-line-clamp': rowHeight || 1, + '-webkit-line-clamp': rowHeightTruncateLines(rowHeight), '-webkit-box-orient': 'vertical', 'overflow': 'hidden', }" >