suren-atoyan / monaco-react

Monaco Editor for React - use the monaco-editor in any React application without needing to use webpack (or rollup/parcel/etc) configuration files / plugins
https://monaco-react.surenatoyan.com/
MIT License
3.64k stars 260 forks source link

Models persist after unmount Editor when use multi model editor #493

Open FrancoJavierGadea opened 1 year ago

FrancoJavierGadea commented 1 year ago

Describe the bug When a Editor is unmounting dispose only the current model. In multi model editors shoud be dispose all model associates to the Editor

To Reproduce

Steps to reproduce the behavior:

  1. Go to https://codesandbox.io/s/multi-model-editor-forked-zz347j?file=/src/App.js
  2. Click on files buttons
  3. Click on Simulate unmount
  4. See error, how models persist after unmount the editor

https://codesandbox.io/s/multi-model-editor-forked-zz347j?file=/src/App.js

zbqsfs commented 2 months ago

Has there been any progress on this issue?