fix(editor): reativar edição ao atribuir responsável
- Atualiza RichTextEditor para refletir mudanças de disabled (setEditable) - Corrige bug onde editor permanecia travado até F5 após atribuição
This commit is contained in:
parent
5535ba81e6
commit
7ed7775c05
1 changed files with 6 additions and 0 deletions
|
|
@ -137,6 +137,12 @@ export function RichTextEditor({
|
||||||
}
|
}
|
||||||
}, [value, editor])
|
}, [value, editor])
|
||||||
|
|
||||||
|
// Reflect disabled prop changes after initialization
|
||||||
|
useEffect(() => {
|
||||||
|
if (!editor) return
|
||||||
|
editor.setEditable(!disabled)
|
||||||
|
}, [disabled, editor])
|
||||||
|
|
||||||
if (!editor) return null
|
if (!editor) return null
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue