Various fixes (#11108)

Fixes many bug regarding TableCell and InlineCells
This commit is contained in:
Charles Bochet
2025-03-22 14:19:10 +01:00
committed by GitHub
parent 692e08f0d4
commit ccf60284cf
61 changed files with 473 additions and 374 deletions

View File

@ -14,7 +14,7 @@ import {
import { TextInput } from '@/ui/input/components/TextInput';
import { useTheme } from '@emotion/react';
import styled from '@emotion/styled';
import { useMemo, useState } from 'react';
import { useState } from 'react';
import { isDefined } from 'twenty-shared';
import {
IconCalendar,
@ -94,11 +94,6 @@ export const AttachmentRow = ({
const [attachmentFileName, setAttachmentFileName] =
useState(originalFileName);
const fieldContext = useMemo(
() => ({ recoilScopeId: attachment?.id ?? '' }),
[attachment?.id],
);
const { destroyOneRecord: destroyOneAttachment } = useDestroyOneRecord({
objectNameSingular: CoreObjectNameSingular.Attachment,
});
@ -161,7 +156,13 @@ export const AttachmentRow = ({
};
return (
<FieldContext.Provider value={fieldContext as GenericFieldContextType}>
<FieldContext.Provider
value={
{
recordId: attachment.id,
} as GenericFieldContextType
}
>
<ActivityRow disabled>
<StyledLeftContent>
<AttachmentIcon attachmentType={attachment.type} />