My Vue filter retrieves and combines address details with a ,
Vue.filter('address', (address, countryNames = []) => {
const formattedAddress = [
address?.name,
address?.company,
address?.add1,
address?.add2,
address?.town,
address?.county,
address?.postcode,
countryNames[address?.countryId],
]
return formattedAddress.filter((value) => value).join(', ')
})
Here is the result:
[![enter image description here][1]][1]
I am looking to insert a <br>
after the name and county for this desired outcomehttps://i.stack.imgur.com/olBXS.png:
Can this be achieved through the filter?