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

Updating model value leaves old code in the editor #46

Open
ericuldall opened this issue Jul 17, 2024 · 1 comment
Open

Updating model value leaves old code in the editor #46

ericuldall opened this issue Jul 17, 2024 · 1 comment

Comments

@ericuldall
Copy link

Using a basic example like const code = ref() as the v-model value, if elsewhere in my component I set code.value = '' i'm not seeing the editor code reset. However if I set code.value = 'test' it works as expected. Any idea why this is happening?

@logue
Copy link
Owner

logue commented Aug 15, 2024

Since model is a string or Text type, when assigning a space, use ref('') instead of ref().

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

2 participants