Fix mobile table styling outside record table (#10407) (#10663)

Fix to issue #10407 now including a fix to `ChipFieldDisplay` [throwing
an error outside a record
table](https://twenty-v7.sentry.io/issues/6350031213/?project=4507072563183616&referrer=github-pr-bot).

This works now, but refactoring is needed before merging.

Fixes #10407

---------

Co-authored-by: ad-elias <elias@autodiligence.com>
Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
This commit is contained in:
eliasylonen
2025-04-01 17:11:31 +02:00
committed by GitHub
parent 8385e2d08b
commit 51ea241a1c
12 changed files with 142 additions and 101 deletions

View File

@ -22,6 +22,7 @@ export type RecordChipProps = {
maxWidth?: number;
to?: string | undefined;
size?: ChipSize;
isLabelHidden?: boolean;
};
export const RecordChip = ({
@ -33,6 +34,7 @@ export const RecordChip = ({
to,
size,
forceDisableClick = false,
isLabelHidden = false,
}: RecordChipProps) => {
const { recordChipData } = useRecordChipData({
objectNameSingular,
@ -74,6 +76,7 @@ export const RecordChip = ({
maxWidth={maxWidth}
placeholderColorSeed={record.id}
name={recordChipData.name}
isLabelHidden={isLabelHidden}
avatarType={recordChipData.avatarType}
avatarUrl={recordChipData.avatarUrl ?? ''}
className={className}