-
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
react-monaco-editor in Modal Component doesn't work #652
Comments
I have same problem, and I found this problem is cause by Ant Design, you can try to unupgrade Ant Design to 4.23.1. |
add config <MonacoEditor
width="800"
height="600"
language="javascript"
theme="vs-dark"
value={code}
options={{ automaticLayout: true }}
//... |
Not sure if it's related but when using the component in my app with some custom css and webpack config, the editor was also rendering with a height of 5px, and I just realised that switching
to
made a difference 🤔 |
yes It's helpful! thank you! |
同样的发现,但是目前没有找到具体是antd的什么原因引起的。 |
I encounter this problem, 'The container has valid width and height while the editor's width and height are only 5px', I could not see any error in the console of DevTool。 [react-monaco-editor] component works well in other page in my project.
"react-monaco-editor": "^0.34.0", "monaco-editor": "^0.20.0".
Any help?Thanks.
The text was updated successfully, but these errors were encountered: