LWC template "iterator" directive shows incorrect error if custom name is used
Issue #1938
resolved
LWC <template> tags can generate lists using either “for:each” or “iterator:<myIteratorName>”.
The example code on this documentation page uses the name “it” for the iterator.
https://developer.salesforce.com/docs/component-library/documentation/en/lwc/lwc.create_lists
In IlluminatedCloud, that example works fine.
However, using a custom iterator name results in a couple error messages in the editor (see screenshots).
This isn’t actually an error. There’s no compile error on the Salesforce side, and the component successfully loops when run in the browser.
I’m not losing any sleep over this one.
Comments (3)
-
repo owner -
repo owner Fix committed for inclusion in the next build.
-
repo owner - changed status to resolved
Delivered in 2.1.8.5.
- Log in to comment
Yeah, I've known about this one for a while...IC2 knows about
iterator:it
but not any custom iterator names, and of course not only does that stifle the best practice of descriptive naming, but it kills nested iteration. I'll take a look and see if I can make IC2 properly grok these custom names.