delete attachment when file is removed from activity body (#11952)
Using useEffect triggered at ActivityRichTextEditor unmount, to delete attachments only when note is closed (and not when file block is deleted during note update to keep command + z shortcut) closes : https://github.com/twentyhq/twenty/issues/11229
This commit is contained in:
@ -2,8 +2,8 @@ import { BLOCK_SCHEMA } from '@/activities/blocks/constants/Schema';
|
||||
import { recordStoreFamilyState } from '@/object-record/record-store/states/recordStoreFamilyState';
|
||||
import { isNonEmptyString } from '@sniptt/guards';
|
||||
import { useRecoilCallback } from 'recoil';
|
||||
import { isDeeplyEqual } from '~/utils/isDeeplyEqual';
|
||||
import { isDefined } from 'twenty-shared/utils';
|
||||
import { isDeeplyEqual } from '~/utils/isDeeplyEqual';
|
||||
|
||||
export const useReplaceActivityBlockEditorContent = (
|
||||
editor: typeof BLOCK_SCHEMA.BlockNoteEditor,
|
||||
|
||||
Reference in New Issue
Block a user