Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changing the value in store will not update the component & contents #121

Open
OsamaShabrez opened this issue Jun 28, 2017 · 7 comments
Open

Comments

@OsamaShabrez
Copy link

If CodeMirror value is changed at the backend, directly in the store the component does not reflect the latest changes.

There is no way I have found so far that can force update the component. Any help would be greatly appreciated.

@zane-c
Copy link

zane-c commented Jun 28, 2017

+1

@marcofugaro
Copy link

I also have this issue

@scniro
Copy link

scniro commented Jul 12, 2017

@OsamaShabrez @zane-c @marcofugaro hey all, I too was having similar issues and threw up react-codemirror2 which doesn't seem to suffer from this. I'm planning to maintain it moving forward. Feel free to open up an issue on the repo should anything seem off and I'll be on it 😎

@jaredly
Copy link

jaredly commented Jul 13, 2017

here's the offending commit 339b597

121watts added a commit to influxdata/chronograf that referenced this issue Jul 14, 2017
Had to downgrade react-codemirror due to a bug.  Issues and PRs
are open to resolve:
- JedWatson/react-codemirror#121
- JedWatson/react-codemirror#106
@themre
Copy link

themre commented Jul 19, 2017

ugly hack:

<CodeMirror ref={el => this.cm = el} ... />

and then in the code where you want to update:
this.cm.codeMirror.setValue(newValue)

@inoas
Copy link

inoas commented Jul 19, 2017

@JedWatson can you take a look at 339b597 and possibly just reverse it as @jaredly pointed out?

121watts added a commit to influxdata/chronograf that referenced this issue Jul 25, 2017
Had to downgrade react-codemirror due to a bug.  Issues and PRs
are open to resolve:
- JedWatson/react-codemirror#121
- JedWatson/react-codemirror#106
121watts added a commit to influxdata/chronograf that referenced this issue Aug 7, 2017
Had to downgrade react-codemirror due to a bug.  Issues and PRs
are open to resolve:
- JedWatson/react-codemirror#121
- JedWatson/react-codemirror#106
121watts added a commit to influxdata/chronograf that referenced this issue Sep 7, 2017
Had to downgrade react-codemirror due to a bug.  Issues and PRs
are open to resolve:
- JedWatson/react-codemirror#121
- JedWatson/react-codemirror#106
121watts added a commit to influxdata/chronograf that referenced this issue Sep 12, 2017
Had to downgrade react-codemirror due to a bug.  Issues and PRs
are open to resolve:
- JedWatson/react-codemirror#121
- JedWatson/react-codemirror#106
@ticky
Copy link

ticky commented Sep 23, 2017

I just spent an hour chasing this bug. 🤦🏻‍♀️ Thanks for the (working) fork, @scniro!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants