Skip to content

Commit

Permalink
Nc fix(nc-gui): remove lookup cell chip min width fixed value (#7969)
Browse files Browse the repository at this point in the history
* fix(nc-gui): remove lookup cell chip min width fixed value

* fix(nc-gui): lookup display content should be center align for rowHeight short & for others top align
  • Loading branch information
rameshmane7218 committed Mar 27, 2024
1 parent f592411 commit 935085b
Showing 1 changed file with 16 additions and 5 deletions.
21 changes: 16 additions & 5 deletions packages/nc-gui/components/virtual-cell/Lookup.vue
Original file line number Diff line number Diff line change
Expand Up @@ -158,11 +158,13 @@ const { showEditNonEditableFieldWarning, showClearNonEditableFieldWarning, activ
}"
>
<div
class="flex items-start gap-1.5 w-full h-full py-[3px]"
class="flex gap-1.5 w-full h-full py-[3px]"
:class="{
'flex-wrap': rowHeight !== 1 && !isAttachment(lookupColumn),
'!overflow-x-auto nc-cell-lookup-scroll nc-scrollbar-x-md !overflow-y-hidden':
rowHeight === 1 || isAttachment(lookupColumn),
'items-center': rowHeight === 1,
'items-start': rowHeight !== 1,
}"
>
<div
Expand All @@ -187,10 +189,19 @@ const { showEditNonEditableFieldWarning, showClearNonEditableFieldWarning, activ
:edit-enabled="false"
:virtual="true"
:read-only="true"
:class="{
'min-h-0 min-w-0': isAttachment(lookupColumn),
'!min-w-20 !w-auto px-2': !isAttachment(lookupColumn),
}"
:class="[
`${
[UITypes.MultiSelect, UITypes.SingleSelect, UITypes.User].includes(lookupColumn.uidt)
? 'pl-2'
: !isAttachment(lookupColumn)
? 'px-2'
: ''
}`,
{
'min-h-0 min-w-0': isAttachment(lookupColumn),
'!w-auto ': !isAttachment(lookupColumn),
},
]"
/>
</div>
</div>
Expand Down

0 comments on commit 935085b

Please sign in to comment.