I'm trying to set a height in px on my container when the size updates. I can display the size as text, and it updates when my container resizes. However, the height attribute on my container does not update.
Js:
setup() {
const el = ref(null);
const { height, width } = useElementSize(el);
return {height, width, el,}
}
Html:
{{ height }}
<div>
:style="{ height: `${height}px` }"
ref="el"
>
Resizeable items whoopwhoop
</div>
In this case my {{ height }} updates if I remove the :style attribute, but it says 0px with the :style attribute. How can I fix this?