Skip to content

Directive not updated if component changes its root element #6513

Closed
@floorish

Description

@floorish

Version

2.4.2

Reproduction link

https://jsfiddle.net/floorish/25ukxqmu/

Steps to reproduce

  • add custom directive to some child component
  • child component changes its root element due to data change, i.e. <span v-if="val"></span><div v-else></div>

What is expected?

Directive is notified that the component is changed and the new <div> element is passed

What is actually happening?

Directive is not updated and still refers to the old <span> DOM node

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