Fix composer workspace attachment update loop

This commit is contained in:
Mohamed Boudra
2026-05-01 19:51:58 +07:00
parent 68d32eb183
commit 1fdfefc4de
2 changed files with 66 additions and 3 deletions
@@ -112,9 +112,12 @@ function useWorkspaceAttachmentBinding({
);
useEffect(() => {
setSuppressedKeys((current) =>
current.filter((suppressedKey) => workspaceAttachmentKeys.includes(suppressedKey)),
);
setSuppressedKeys((current) => {
const next = current.filter((suppressedKey) =>
workspaceAttachmentKeys.includes(suppressedKey),
);
return next.length === current.length ? current : next;
});
}, [workspaceAttachmentKeys]);
const buildOutgoingAttachments = useCallback(