I get selection as a prop from the parent component. The problem is, If I update the selection on the parent component, it gets updated in the CodeEditor component (I check that by the console.log inside useEffect) but the selected area on the editor doesn't update (the blue-highlighted area that appears when you select a text).
I've an UnControlled Editor, imported as CodeMirror. Here's how I configure it:
I get
selection
as aprop
from the parent component. The problem is, If I update theselection
on the parent component, it gets updated in theCodeEditor
component (I check that by the console.log inside useEffect) but the selected area on the editor doesn't update (the blue-highlighted area that appears when you select a text).