Skip to content

template ref does not work as expected #1869

@BillSchumacher

Description

@BillSchumacher

Version

3.0.0-rc.5

Reproduction link

https://github.com/BillSchumacher/minimal-ref

Steps to reproduce

git clone git@github.com:BillSchumacher/minimal-ref.git
cd minimal-ref
yarn install
yarn run dev
Open dev tools.

What is expected?

The hello and logo references should be accessible and trigger the computed property to refresh after the template has rendered. This should cause the computed style to update and probably update the output in the console.

What is actually happening?

References are not triggering reactive updates once assigned or the template has been compiled.


Computing dynamic styles based on the parent container height for example would require looking up the element using a dom selector if this feature is not accessible.

I'm trying to implement the react-color package in Vue3, the gradient containers rely on the parent element's clientHeight. You'll notice that this.$refs does indeed update in the console but the computed function is not called again.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions