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', 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, { Object.assign(styleProperties, {
breakWord: 'break-word', breakWord: 'break-word',
whiteSpace: 'normal', whiteSpace: 'normal',

View File

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