Skip to main content
I am trying to complete the last segment of this trail.  I'm getting the following error: Challenge Not yet complete... here's what's wrong: 

The campingList component doesn't appear to have a Quantity input field in the form using a Lightning Base component.

On my camping list component I refer to two other components.  c:campingListForm and c: campingListItem   I do have the Quanity field on each of those components.  I assume it is the campingListItem that I am having issue with but not sure why.  This code was not a problem for the all of the other segments of the trail.  Any help would be greatly appreciated.  Here is the code for my camplinglistitem component:

​<aura:component >

 <aura:attribute name="item" type="Camping_Item__c" />

  

    <p>Name:

        <ui:outputText value="{!v.item.Name}"/>

    </p>

    

    <p>Price:

        <ui:outputCurrency value="{!v.item.Price__c}"/>

    </p>

    

    <p>Quantity:

                <ui:outputNumber value="{!v.item.Quantity__c}"/>

    </p>

    

    <p>Packed:

        <ui:outputCheckbox value="{!v.item.Packed__c}"/>

    </p>

    

    <ui:button label="Packed!"

            press="{!c.packItem}"/>

    

</aura:component>
3 respuestas
  1. 25 sept 2017, 7:24
    The campingList component doesn't appear to have a Quantity input field in the form using a Lightning Base component.

    Lightning Base componets are the ones haveing "lightning" namespace not "ui" namespace. Like lightning:card, lightning:input.

    https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/aura_compref_lightning_formattedNumber.htm

    I think you have to use lightning:formattedNumber to display a number field.