fontawesome icon not rendering in columnDef
fontawesome icon not rendering in columnDef
mshah
Posts: 19Questions: 5Answers: 1
I have the following, but fontawesome is not rendering an icon in the column.
It just renders the tag: <i class='fa-solid fa-user-secret'></i>
Answers
At a glance, that looks OK. Have you included the fontawesome file in your sources?
If that doesn't help, please can you fix your test case, it's not running so hard to debug the issue.
Colin
Hmm, how do I include the fontawesome file?
https://www.w3schools.com/icons/fontawesome_icons_intro.asp
Alternatively, the Fontawesome site instructions would be a sensible place to look.
https://fontawesome.com/v3/get-started/
I'm not familiar with VUE but here are the steps to include FA with VUE:
https://fontawesome.com/docs/web/use-with/vue/
You can determine if the problem is with Datatables (not likely) or with missing FA libraries by including the tag somewhere on your page outside the Datatable. Let us know what you find.
Kevin
is there a vue way of doing it?
Ironically, when I put the tag outside of the column, directly in the html, it renders fine. It's just in the columnDef it does not. Is there something I need to do to tell it to generate the icon?
That's really a question for the Font awesome people.
If you can create a test case on Stackblitz I might be able to help though.
Allan
I put one here : https://stackblitz.com/edit/vue-hkhcux It's just having some weird issue with fontawesome in stackblitz, not sure why.
I'm really sorry - I don't immediately know what is causing that, and since it is a third party library, it is beyond the free support that I can provide. You'd be best taking that up with FontAwesome.
Allan