Skip to content

$attrs not updating when change attrs via template v-if #1712

@0x009922

Description

@0x009922

Version

3.0.0-rc.4

Reproduction link

https://codepen.io/liquid-solid/pen/ZEQZLWp

Steps to reproduce

Custom input components renders via v-for and their state depends on which values in list, true or false. There are different placeholders for false and true state. Click 'Add true to start' button to add true value to start of items array and you can see that value in start of array is true, but placeholder still in false state.

What is expected?

I expected for my-input component to update his placeholder to 'truthy' when value becomes true.

What is actually happening?

Actually my-input component saves his 'falthy' placeholder when value becomes true.


Expected behavior is needed for saving components state using only key. For example, true value may be added not on button click, but on input on falthy my-input , and i want to save focus on this element, but not remounting this component and all its internals, i want simply change his state. I am used to tricks like this in Vue 2.

P. S. Sorry for my english )

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