react-contenteditable
react-contenteditable copied to clipboard
Changing 'disabled' prop not working on clientside when rendered on SSR
I'm using Next.js, it populates a div with 'contenteditable' attribute according to 'disabled' prop on server side.
When clientside toggles 'disabled' prop of the component and tries to rehydrate/rerender the component, it doesnt override the existing 'contenteditable' attribute on the div.
used this as a work around:
useEffect(() => {
innerRef.current.setAttribute('contenteditable', !(disabled))
}, [innerRef,disabled])
i also encoutering this issue with the same workaround hope for fix
Also seeing this. It doesn't seem related to SSR, I'm using ContentEditable client side, despite passing disabled={true} contenteditable=true when inspecting the source.