Update x-for directive documentation on table elements#4730
Update x-for directive documentation on table elements#4730NightFurySL2001 wants to merge 2 commits intoalpinejs:mainfrom
Conversation
PR Review: #4730 — Update x-for directive documentation on table elementsType: Docs What's happening (plain English)This PR makes two kinds of changes to the
Problems1. Code errors in the examples:
2. Security concern in workaround #4: This uses 3. Disproportionate length: 4. Framing: 5. Style inconsistency: Other approaches considered
Changes MadeNo changes made. The issues require contributor input or a fundamental restructuring of the section. Test ResultsDocs-only PR — no tests applicable. CI passes (build: ✅). Code Review
SecurityThe VerdictRequest changes. The minor formatting fixes are welcome, but the large new section needs work:
The core information is useful — people do hit this — but the current form is too verbose and contains errors. A concise version would be a good addition to the docs. Reviewed by Claude |
|
Thanks for raising this issue, @NightFurySL2001! Your PR identified a real pain point that users have been hitting since 2020. I've opened two PRs to address this:
<tr>
<template x-for="(color, idx) in colors">
<td x-text="color"></td>
<td x-text="idx"></td>
</template>
</tr>You're credited as a co-author on both commits. Closing this in favor of the above PRs. |
|
That looks great, thanks! Sorry was busy with Lunar New Year so hadn't have chance to update, but glad to see the x-for is getting more support! |
No description provided.