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

Component is not recreated/rendered #129

Open
Tealons opened this issue Apr 24, 2024 · 2 comments
Open

Component is not recreated/rendered #129

Tealons opened this issue Apr 24, 2024 · 2 comments

Comments

@Tealons
Copy link

Tealons commented Apr 24, 2024

I'm using Blazor server and added the editor like this on my AddScript page:

<StandaloneCodeEditor @ref="_editor" OnDidChangeModelContent="HandleInput" Id="my-editor-instance-id" CssClass="editor-500" ConstructionOptions="EditorConstructionOptions" />

I now see however that when I visit the same page the second time, the script I typed earlier is still there. It looks like the component is is persistent and not re-rendered when visiting the page for the second time? What is it that I'm missing here?

@georgedaters
Copy link

@Tealons I think I've experienced that same issue. In every page that uses the editor, try have the page implement the IDisposable interface then in the Dispose method call Editor.DisposeEditor() (where Editor is a reference to the StandaloneCodeEditor component)

@chrisonmoon
Copy link

Hello - i have the same problem.

The solution with Dispose() did not work...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants