Skip to content

Inconsistent bind: behaviour with spread objects on components versus elements #14839

@qwuide

Description

@qwuide

Describe the bug

The behaviour of bind: differs when spreading an object onto a component versus an element.

When spreading an object onto a component containing a key with both a get and a set accessor, a binding is established for that key.

However, when spreading the same object onto an element, the binding is not established. Explicitly declaring the binding (e.g. bind:value={obj.value}) works, though.

I'm not sure what the intended behaviour is, but I think it should be consistent for both components and elements.

Reproduction

Playground

Logs

No response

System Info

...

Severity

annoyance

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