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

when using onEditQuery, the explorer scroll resets to the beginning #3533

Open
1 task done
nadendlaprasad opened this issue Feb 12, 2024 · 1 comment
Open
1 task done

Comments

@nadendlaprasad
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

In the context of onEditQuery handler, every time it fires, i had to set a state which then resets the scroll to the beginning.

Expected Behavior

The scroll state should persist based on the active query or remain as is without resetting to the beginning.

Steps To Reproduce

const test = ()=>{
const [query, setQuery] = useState("");
const plugins = [explorer];
const onEditQuery = (query) => {
setQuery(query);
};
return ( )
}

Environment

  • GraphiQL Version: 3.0.10
  • OS: Windows/Linux
  • Browser: Chrome
  • Bundler:
  • react 18.1.0
  • graphql Version: 16.4.0

Anything else?

No response

@nadendlaprasad nadendlaprasad changed the title when using onEditQuery, the explorer scroll resets to beginning when using onEditQuery, the explorer scroll resets to the beginning Feb 12, 2024
@jacobhoekert
Copy link

I have the same issue

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

No branches or pull requests

2 participants