Skip to content

Conversation

codders
Copy link
Contributor

@codders codders commented Jun 27, 2025

We currently support iterating over arrays in Vue statements, like <a v-for="item in list">, but this support is currently limited to data at the top-level of our template data object.

Add support for member expressions in v-for statements so that we can handle statements like <a v-for="item in list.data">.

Bug: T398011

@codders codders requested a review from lucaswerkmeister June 27, 2025 07:04
Base automatically changed from feat/peast-complex-expression-support-20250625 to master June 27, 2025 10:13
@lucaswerkmeister lucaswerkmeister force-pushed the feat/handle-member-expression-v-for-data-20250627 branch from f37c5a1 to cb3073f Compare June 27, 2025 10:14
@codders codders force-pushed the feat/handle-member-expression-v-for-data-20250627 branch from cb3073f to 7fd666f Compare June 27, 2025 14:37
We currently support iterating over arrays in Vue statements, like
`<a v-for="item in list">`, but this support is currently limited
to data at the top-level of our template data object.

Add support for member expressions in v-for statements so that we
can handle statements like `<a v-for="item in list.data">`. While
we do that, make sure that ':key' attributes in 'v-for' directives
are not written out to the output.

Bug: T398011
@codders codders force-pushed the feat/handle-member-expression-v-for-data-20250627 branch from 7fd666f to facd231 Compare June 27, 2025 14:38
@lucaswerkmeister lucaswerkmeister merged commit 82eed3b into master Jun 27, 2025
8 checks passed
@lucaswerkmeister lucaswerkmeister deleted the feat/handle-member-expression-v-for-data-20250627 branch June 27, 2025 15:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants