-
-
Notifications
You must be signed in to change notification settings - Fork 270
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
onValidate in multiple editors #182
Comments
Hi @sujinleeme Thank you for providing Here is a workaround to solve your problem. The |
Hey @sujinleeme I couldn't manage to solve it at the end of the week. The absence of the API for live model makers makes it harder to provide an alternative approach. I'll continue to look for alternative ways to solve it, let this issue be open. I'll keep you up to date. |
Sadly, the timeout-based workaround isn't reliable — on some systems a short timeout is sufficient, on others a longer one, and there doesn't seem to be a reliable way to consistently get the current markers short of periodically polling for them. |
Since this feature was a go-no-go for us, we ended up using monaco manually as outlined over here. For anyone else running into this issue, beware that it's a fair bit more work than this wrapper library, but it does allow you to avoid the above problem. |
you also can create your own |
I have also been troubled by this problem. But I solved it by saving which editor was changed in the onChange handler, then found the changed editor when onValidate is trigered |
Hello everyone @sujinleeme @Etheryte @jerryrat2016
|
@suren-atoyan Wow. Thanks for updating exciting news! 👍 |
Describe the bug
Hello, I have been using two editors with the same language setting and so on. If there are multiple editor components and one of them has broken input, only
onValidate
of the last component is executed and it has the other component's markers values.To Reproduce
CodeSandbox: https://codesandbox.io/s/onvalidate-forked-tpxst?file=/src/App.js:123-130
The text was updated successfully, but these errors were encountered: