Sal Niro

Results 81 comments of Sal Niro

@flashpixx You'll want to delegate a callback here, especially since you have an ajax call. Per [the events | `editorDidMount`](https://github.com/scniro/react-codemirror2#events) > invoking optional next will trigger editorDidConfigure So in this...

@flashpixx Interesting, I just looked in the source again and the [signature for `editorDidMount`](https://github.com/scniro/react-codemirror2/blob/master/src/index.tsx#L41) indeed expects three parameters ``` editorDidMount?: (editor: codemirror.Editor, value: string, cb: () => void) => void;...

@flashpixx You appear to not be using the `Controlled` component correctly. You need to bind a state value and manage that manually such as the example ```jsx { this.setState({value}); }}...

@flashpixx I am a lot shorter on time these days as when I started this project. Codemirror & React APIs are moving to quickly for me to keep atop of...

Interesting, thanks for opening this up, I'll give this a look later today. There is a bit of logic going on for controlled mode to retain/set the cursor in certain...

@edmondxiexie Sorry for the delayed response. Okay yep I can definitely reproduce this. Can you use the uncontrolled variant for now? I'm unsure how much work this could entail. I...

@edmondxiexie okay so I dug into this a bit and _think_ I may know whats going on here. Basically, for the controlled component there is also a dummy DOMless codemirror...

@xralphack odd, this shouldn't be an issue for uncontrolled

@xralphack Cool - no worries. Yea I haven't been able to make a lot of forward progress on this one. It's pretty gnarly on the inside of whats going on...

@xralphack `shouldComponentUpdate` for `UnControlled`? Interesting, very. I use this lifecycle hook when responding to new props via the uncontrolled component for resetting values, setting a new theme, etc. Do you...