graphiql
graphiql copied to clipboard
when using onEditQuery, the explorer scroll resets to the beginning
Is there an existing issue for this?
- [X] 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 (<GraphiQL plugins={plugins} onEditQuery={onEditQuery}> </GraphiQL>) }
Environment
- GraphiQL Version: 3.0.10
- OS: Windows/Linux
- Browser: Chrome
- Bundler:
react18.1.0graphqlVersion: 16.4.0
Anything else?
No response
I have the same issue