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

HTMLDivElement not reactive in computed property #2387

Closed
ljcremer opened this issue Oct 15, 2020 · 2 comments
Closed

HTMLDivElement not reactive in computed property #2387

ljcremer opened this issue Oct 15, 2020 · 2 comments

Comments

@ljcremer
Copy link

Version

3.0.0

Reproduction link

https://jsfiddle.net/ljcremer/uLjd85va/159/

Steps to reproduce

Run the application and then change the width of the fiddle run section.

What is expected?

I expect the computed property computedWidth to change reactively

What is actually happening?

It does not change reactively


I first tried with ref but the same symptom.
Also tried to use the recommended method in #901 but still no luck

@jacekkarczmarczyk
Copy link
Contributor

dom properties are not reactive

@yyx990803
Copy link
Member

yyx990803 commented Oct 15, 2020

This is expected behavior. Vue does not observe native DOM elements. Only plain userland objects can be made reactive.

@github-actions github-actions bot locked and limited conversation to collaborators Nov 2, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants