Various fixes (#11108)
Fixes many bug regarding TableCell and InlineCells
This commit is contained in:
@ -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} />
|
||||
|
||||
Reference in New Issue
Block a user