I have following component which renders pills after filtering showing attributes of filtering. I want to render them individually without container but its not working and I am getting all of them inside a container. Why should this happen?
Component:
<aura:component >
<aura:attribute name="pillsList" type="string[]" />
<span class="slds-pill">
<aura:iteration var="pillLabel" items="{!v.pillsList}">
<span class="slds-pill">{!pillLabel}
<button class="slds-button slds-button--icon slds-pill__remove" title="Remove">
<lightning:icon iconName="utility:close" size="x-small" class="slds-input__icon" alternativeText="Remove" />
</button>
</span>
</aura:iteration>
</span>
</aura:component>
Expected :
Actual: