Subscribe on changes!

can't bind "is" attribute with v-bind object syntax

avatar
Dec 10th 2021

Version

3.2.24

Reproduction link

codesandbox.io

Steps to reproduce

See reproduction link.

What is expected?

is in v-bind object behaves like in the single syntax, so: both :is="component" and v-bind="{ is: component }" should work.

What is actually happening?

v-bind="{ is: component }" will be only an attribute but won't behave as the actual is attribute for dynamic components.


Not sure if it should be listed as a breaking change or should vue 3 handle this as vue 2.6.x did

The solution for this to work is <component v-bind="componentOptions" :is="componentOptions.is" /> however this solution still puts an is attribute on the component which is unintended.

avatar
Dec 10th 2021

Please, search existing issues and pull requests before opening issues, it saves maintainers a lot of time 🙏: https://github.com/vuejs/vue-next/issues?q=is%3Aissue+sort%3Aupdated-desc+v-bind+is+is%3Aclosed