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

onEditVariables is not triggered on first render #1532

Closed
krishnan-r opened this issue May 18, 2020 · 3 comments · Fixed by #1545
Closed

onEditVariables is not triggered on first render #1532

krishnan-r opened this issue May 18, 2020 · 3 comments · Fixed by #1545

Comments

@krishnan-r
Copy link

I'm trying to use <GraphiQL> as a controlled component, with a global redux store.

I noticed that in 1.x, VariableEditor ignores change events till the first componentDidUpdate

this.ignoreChangeEvent = true;
I guess ignoreChangeEvent should be initialized to false

  • Also both versions do not debounce onEditVariables, whereas onEditQuery seems to be debounced.

Happy to contribute/raise a PR for this.

@acao acao added the bug label May 18, 2020
@acao
Copy link
Member

acao commented May 18, 2020

@krishnan-r thanks for reporting, a PR for this would be fantastic! I might get to it myself later today anyways.

@acao
Copy link
Member

acao commented May 18, 2020

if you could do one PR for the bugfix, and a seperate for the debounce, that would be fantastic

@acao acao added this to the GraphiQL-1.0.0 milestone May 18, 2020
@krishnan-r
Copy link
Author

Sure, I'll make the PRs

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

Successfully merging a pull request may close this issue.

2 participants