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

Editor Props don't revalidate after onChange Events #555

Open
AlpayC opened this issue Nov 10, 2023 · 2 comments
Open

Editor Props don't revalidate after onChange Events #555

AlpayC opened this issue Nov 10, 2023 · 2 comments
Labels

Comments

@AlpayC
Copy link

AlpayC commented Nov 10, 2023

When the React Monaco Editor component is loaded, it fails to update certain prop settings correctly during onChange events. This issue is particularly noticeable with the defaultLanguage prop, where the entered text in the editor is not highlighted correctly.

A workaround for this issue is to re-render the component every time an onChange event is triggered. Only when the component is remounted, the prop is updated, and the highlighting works as expected.

@suren-atoyan
Copy link
Owner

@AlpayC could you please share a code snippet for this?

Copy link

This issue has been marked as stale due to inactivity. It will be closed in 7 days unless further activity occurs.

@github-actions github-actions bot added the Stale label Mar 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants