Browse Source

Bug fix for issue #5438, resolved text-overflow with text-wrapping

pull/5531/head
nith2001 2 years ago
parent
commit
68b9f30b98
  1. 12
      packages/nc-gui/components/smartsheet/Form.vue
  2. 5
      packages/nc-gui/components/smartsheet/header/Cell.vue
  3. 5
      packages/nc-gui/components/smartsheet/header/VirtualCell.vue

12
packages/nc-gui/components/smartsheet/Form.vue

@ -697,7 +697,7 @@ watch(view, (nextView) => {
<a-form-item <a-form-item
v-if="isVirtualCol(element)" v-if="isVirtualCol(element)"
:name="element.title" :name="element.title"
class="!mb-0" class="!mb-0 nc-input-required-error"
:rules="[ :rules="[
{ {
required: isRequired(element, element.required), required: isRequired(element, element.required),
@ -719,7 +719,7 @@ watch(view, (nextView) => {
<a-form-item <a-form-item
v-else v-else
:name="element.title" :name="element.title"
class="!mb-0" class="!mb-0 nc-input-required-error"
:rules="[ :rules="[
{ {
required: isRequired(element, element.required), required: isRequired(element, element.required),
@ -743,7 +743,7 @@ watch(view, (nextView) => {
</LazySmartsheetDivDataCell> </LazySmartsheetDivDataCell>
</a-form-item> </a-form-item>
<div class="text-gray-500 text-xs" data-testid="nc-form-input-help-text-label">{{ element.description }}</div> <div class="nc-form-help-text text-gray-500 text-xs" data-testid="nc-form-input-help-text-label">{{ element.description }}</div>
</div> </div>
</template> </template>
@ -861,6 +861,12 @@ watch(view, (nextView) => {
} }
} }
.nc-form-help-text, .nc-input-required-error {
max-width: 100%;
word-break: break-all;
white-space: pre-line;
}
:deep(.nc-cell-attachment) { :deep(.nc-cell-attachment) {
@apply p-0; @apply p-0;

5
packages/nc-gui/components/smartsheet/header/Cell.vue

@ -53,7 +53,7 @@ const openHeaderMenu = () => {
v-if="column" v-if="column"
class="name" class="name"
:class="{ 'cursor-pointer': !isForm && isUIAllowed('edit-column') }" :class="{ 'cursor-pointer': !isForm && isUIAllowed('edit-column') }"
style="white-space: nowrap" style="white-space: pre-line"
:title="column.title" :title="column.title"
@dblclick="openHeaderMenu" @dblclick="openHeaderMenu"
>{{ column.title }}</span >{{ column.title }}</span
@ -95,7 +95,6 @@ const openHeaderMenu = () => {
<style scoped> <style scoped>
.name { .name {
max-width: calc(100% - 40px); max-width: calc(100% - 40px);
overflow: hidden; word-break: break-all;
text-overflow: ellipsis;
} }
</style> </style>

5
packages/nc-gui/components/smartsheet/header/VirtualCell.vue

@ -121,7 +121,7 @@ const closeAddColumnDropdown = () => {
<template #title> <template #title>
{{ tooltipMsg }} {{ tooltipMsg }}
</template> </template>
<span class="name" style="white-space: nowrap" :title="column.title"> {{ column.title }}</span> <span class="name" style="white-space: pre-line" :title="column.title"> {{ column.title }}</span>
</a-tooltip> </a-tooltip>
<span v-if="isVirtualColRequired(column, meta?.columns || []) || required" class="text-red-500">&nbsp;*</span> <span v-if="isVirtualColRequired(column, meta?.columns || []) || required" class="text-red-500">&nbsp;*</span>
@ -164,7 +164,6 @@ const closeAddColumnDropdown = () => {
<style scoped> <style scoped>
.name { .name {
max-width: calc(100% - 40px); max-width: calc(100% - 40px);
overflow: hidden; word-break: break-all;
text-overflow: ellipsis;
} }
</style> </style>

Loading…
Cancel
Save