Hi
What would be the easiest way for me to display a country flag icon in a table cell?
Thanks
Ben
Hi
What would be the easiest way for me to display a country flag icon in a table cell?
Thanks
Ben
using some public flag api?
https://flagsapi.com/
Nice! Thankyou
Is there any way to remove the grey background for the flag images supplied by flagsapi?
you can try another api without grey background
The downloaded PNG is transparent.
Patrick
As an alternative if you have the ISO2 Country code, I use the following line to get the country flag emoji
{{countrySelect.selectedItem.iso2_code.toUpperCase().replace(/./g, char => String.fromCodePoint(127397 + char.charCodeAt() ))}}
Sadly I can't remember who to give the credit to, I found this method after a fair bit of googling.
David