vue-viewports icon indicating copy to clipboard operation
vue-viewports copied to clipboard

$currentViewport is not reactive

Open Espina2 opened this issue 7 years ago • 4 comments

The $currentViewport values do not change when you resize the window.

Espina2 avatar Dec 28 '17 02:12 Espina2

@scaccogatto can you take a look?

Espina2 avatar Dec 28 '17 15:12 Espina2

This variable is not meant to be reactive.

scaccogatto avatar Dec 28 '17 20:12 scaccogatto

So is this way by design. I think it can be very usefull if the variable is reactive, in that way we can show or hide content base on matchMedia.

You can evaluate again the variable on the onresize event.

Espina2 avatar Dec 29 '17 13:12 Espina2

Sure, it would be very useful to make this value reactive.

Saymon-biz avatar Jul 18 '18 13:07 Saymon-biz