-
Notifications
You must be signed in to change notification settings - Fork 370
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
weird state change in newest version #704
Comments
Can confirm this issue in v0.53.0. I have a callback function that needs to be triggered onChange. const { updateAuthenticationSequence } = useAuthenticationFlow();
return (
<MonacoEditor
onChange={ (value: string) => {
updateAuthenticationSequence({
script: value
});
} }
...
/>
); on editor value change, Downgrading to |
Thanks for looking into this. Since you identified the version that introduced the issue, can you send a pull request to resolve this? |
Also experiencing this issue. Downgraded to I don't see an obvious reason for why this is occurring, but it may be related to this useEffect how the |
Describe the bug
it worked in 0.50.1 but in 0.51.0 it is weird.
0.50.1:
https://user-images.githubusercontent.com/49640488/220974267-8c5b3b12-1683-4ab6-924f-c81386439ede.mp4
0.51.0:
https://user-images.githubusercontent.com/49640488/220975391-d467930d-4308-44a0-a26d-87266abe0978.mp4
It occures, if the content in the editor is loaded depending on a state. In our Application we had 3 Tabs. If a user was in the second or third Tab and modified the text and pressed save, the text got saved in the first tab.
To Reproduce
I forked the repo and modified the example. Here is Version 0.50.1:
0.51.0:
This is the Editor to reproduce:
Expected behavior
A mix of both. I would not expect "test2" to stay in the editor, if the content should be undefined as it is in the 0.50.1 Version:
firefox_btRRPoHLpN.mp4
, but I would expect the behaviour of 0.51.0 if I edit something.
Environment (please complete the following information):
The text was updated successfully, but these errors were encountered: