fontawesome icon not rendering in columnDef

fontawesome icon not rendering in columnDef

mshahmshah 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>

Source: https://stackblitz.com/edit/vue-hkhcux

Answers

  • colincolin Posts: 15,234Questions: 1Answers: 2,597

    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

  • mshahmshah Posts: 19Questions: 5Answers: 1

    Hmm, how do I include the fontawesome file?

  • tangerinetangerine Posts: 3,365Questions: 39Answers: 395
    edited July 2023

    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/

  • kthorngrenkthorngren Posts: 20,991Questions: 26Answers: 4,887

    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

  • mshahmshah Posts: 19Questions: 5Answers: 1

    is there a vue way of doing it?

  • mshahmshah Posts: 19Questions: 5Answers: 1

    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?

  • allanallan Posts: 62,858Questions: 1Answers: 10,344 Site admin
    edited July 2023

    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

  • mshahmshah Posts: 19Questions: 5Answers: 1

    I put one here : https://stackblitz.com/edit/vue-hkhcux It's just having some weird issue with fontawesome in stackblitz, not sure why.

  • allanallan Posts: 62,858Questions: 1Answers: 10,344 Site admin

    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

Sign In or Register to comment.