fix: text overflow

This commit is contained in:
Kilu 2024-07-25 14:41:02 +08:00
parent 0373088fb8
commit 0ddabfa217
2 changed files with 5 additions and 3 deletions

View File

@ -21,7 +21,7 @@ function CardField({ rowId, fieldId }: { rowId: string; fieldId: string; index:
textAlign: 'left',
};
if ([FieldType.Relation, FieldType.SingleSelect, FieldType.MultiSelect].includes(Number(type))) {
if (isPrimary || [FieldType.Relation, FieldType.SingleSelect, FieldType.MultiSelect].includes(Number(type))) {
Object.assign(styleProperties, {
breakWord: 'break-word',
whiteSpace: 'normal',

View File

@ -48,12 +48,14 @@ export const DatabaseTabs = forwardRef<HTMLDivElement, DatabaseTabBarProps>(
return classList.join(' ');
}, [layout]);
const showActions = !hideConditions && layout !== DatabaseViewLayout.Calendar;
if (viewIds.length === 0) return null;
return (
<div ref={ref} className={className}>
<div
style={{
width: 'calc(100% - 120px)',
width: showActions ? 'calc(100% - 120px)' : '100%',
}}
className='flex items-center '
>
@ -90,7 +92,7 @@ export const DatabaseTabs = forwardRef<HTMLDivElement, DatabaseTabBarProps>(
})}
</ViewTabs>
</div>
{!hideConditions && layout !== DatabaseViewLayout.Calendar ? <DatabaseActions /> : null}
{showActions ? <DatabaseActions /> : null}
</div>
);
}