From 7ed7775c05b4dcc8c53fc44e0cfe751360d8893b Mon Sep 17 00:00:00 2001 From: codex-bot Date: Mon, 20 Oct 2025 15:06:30 -0300 Subject: [PATCH] =?UTF-8?q?fix(editor):=20reativar=20edi=C3=A7=C3=A3o=20ao?= =?UTF-8?q?=20atribuir=20respons=C3=A1vel?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Atualiza RichTextEditor para refletir mudanças de disabled (setEditable) - Corrige bug onde editor permanecia travado até F5 após atribuição --- src/components/ui/rich-text-editor.tsx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/components/ui/rich-text-editor.tsx b/src/components/ui/rich-text-editor.tsx index 6252e47..3abd499 100644 --- a/src/components/ui/rich-text-editor.tsx +++ b/src/components/ui/rich-text-editor.tsx @@ -137,6 +137,12 @@ export function RichTextEditor({ } }, [value, editor]) + // Reflect disabled prop changes after initialization + useEffect(() => { + if (!editor) return + editor.setEditable(!disabled) + }, [disabled, editor]) + if (!editor) return null return (