Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for destructuring assignment in t-as #1449

Open
sdegueldre opened this issue Jun 5, 2023 · 4 comments
Open

Add support for destructuring assignment in t-as #1449

sdegueldre opened this issue Jun 5, 2023 · 4 comments
Labels
enhancement New feature or request owl-3 features for owl 3
Milestone

Comments

@sdegueldre
Copy link
Contributor

Example of things that would be nice to support:

<t t-foreach="[[1, 'test', 'otherValue'], [2, 'test2', 'somethingElse']]" t-as="[key, value, otherValue]" t-key="key">
  <t t-esc="value"/> is <t t-esc="otherValue"/>
</t>
@sdegueldre sdegueldre added the enhancement New feature or request label Jun 5, 2023
@sdegueldre
Copy link
Contributor Author

Question: what happens with $as_value, $as_index, etc

@ged-odoo
Copy link
Contributor

maybe we could stop supporting them? and if necessary, add t-as-index to give an explicit var name. (obviously, for owl 3 then)

@sdegueldre sdegueldre added the owl-3 features for owl 3 label Jul 20, 2023
@sdegueldre sdegueldre added this to the Version 3.0 milestone Jul 20, 2023
@sdegueldre
Copy link
Contributor Author

(backwards compatible alternative: add a different t-for/t-for-of that doesn't need to support these)

@sdegueldre
Copy link
Contributor Author

backwards compatible proposal: #1491

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request owl-3 features for owl 3
Projects
None yet
Development

No branches or pull requests

2 participants