-
Notifications
You must be signed in to change notification settings - Fork 43
Closed
Description
Suppose I have a card
component like this:
<c-vars title image url />
<a class="card" href="{{ url }}" {{ attrs }}>
<img class="card-img" src="{{ image }}">
<h3 class="card-title">{{ title }}</h3>
{{ slot }}
</a>
I have another component, product
which wraps the card
component like so:
<c-vars product />
<c-card :title=product.name :url=product.url :image=product.image :attrs="attrs">
{{ product.description>
</c-card>
and then call it like so:
<c-product :product="product" target="_blank" />
The result is something like this:
<a href="<link to my product>" class="card" target="_blank" product="<str of product>">
<h3>Product title</h3>
...
In other words the nested component is rendered correctly, except the variable product
is added to the attrs
passed down to :attrs
, even though it is in the <c-vars >
list. The expectation is that any item in <c-vars />
is not included in attrs
, whether rendered in that component or passed down to a nested component using :attrs
.
Metadata
Metadata
Assignees
Labels
No labels