Code completion: aura:iteration variable is not visible in elements' attributes

Issue #1049 resolved
Piotr Kożuchowski created an issue

Whenever in aura:iteration, the var is not recognized by code completion when it is used as attribute of inner element.

Given this code:

                <aura:iteration var="comment" items="{!v.comments}">
                    {!comment.Description__c}
                    <lightning:formattedRichText value="{!comment.Description__c}" />
                </aura:iteration>

When lightning expression is not used as attribute, the comment variable is visible and all fields are visible too in code completion. However, when the same is typed in any element as attribute - in this example in "value" -

<lightning:formattedRichText value="{!comment.Description__c}" />

code completion will only suggest component attributes. "Comment" var is not visible and fields are not suggested.

Also, code completion in attributes show component's attributes without "v." prefix, which should not take place.

While I'm at it, code completion shows Apex methods for "c." value provider in .cmp file. It should show only js controller methods. This used to work correctly in the past.

Kind Regards, Piotr

Comments (6)

  1. Scott Wells repo owner

    Thanks for logging. One of the main upcoming tasks on my plate is to address the remaining code completion/navigation gaps in Lightning. I'll make sure this is on the list.

  2. Log in to comment