You need to sign in to do that
Don't have an account?

Need to strip out character in an aura bound field
I have a column that is a multi-select picklist. I would like to translate the semi-colons returned from SOQL to spaces before I display this value. How would I replace all the ';' with spaces?
Here is the part of my page that displays this column
<aura:iteration items="{!v.territories}" var="t">
<tr>
<td>{!t.States__c}</td>
</tr>
</aura:iteration>
This currently looks like "AK;AL;AR;AZ;CA;CT;CT;DE;FL;GA;HI;IA;ID;IL;IN;KY" which does not wrap well.
Here is the part of my page that displays this column
<aura:iteration items="{!v.territories}" var="t">
<tr>
<td>{!t.States__c}</td>
</tr>
</aura:iteration>
This currently looks like "AK;AL;AR;AZ;CA;CT;CT;DE;FL;GA;HI;IA;ID;IL;IN;KY" which does not wrap well.
You can use jQuery/JavaScript to remove " ; " or you can remove " ; " in your apex controller.
All Answers
You can use jQuery/JavaScript to remove " ; " or you can remove " ; " in your apex controller.