csv font awesome icon not working

csv font awesome icon not working

lieyongchanglieyongchang Posts: 29Questions: 2Answers: 0
edited December 2020 in Free community support

xml and pdf font awesome is working fine except csv. Below are the codes and image

// this is logic that renders all the information on the table
     $(document).ready(function() { 
        
        var table = $('#users').DataTable({
                "dom": 'Bfrtip',
                "buttons": [
                    'copy',
                    {
                        extend : 'csv',
                        title : function() {
                            return "techstudio_assignment";
                        },
                        text : '<i class=fas fa-file-csv aria-hidden="true"> csv</i>',
                    } ,
                    {
                        extend : 'excel',
                        title : function() {
                            return "techstudio_assignment";
                        },
                        text : '<i class="fa fa-file-excel-o" aria-hidden="true"> Excel</i>',
                    } ,
                    
                    {
                        extend : 'pdfHtml5',
                        title : function() {
                            return "techstudi_assignment";
                        },
                        orientation : 'landscape',
                        pageSize : 'LEGAL',
                        text : '<i class="fa fa-file-pdf-o"> PDF</i>',
                        titleAttr : 'PDF'
                    } 
                ],
                            ....

anyone encounter this issue?

This question has an accepted answers - jump to answer

Answers

  • colincolin Posts: 15,237Questions: 1Answers: 2,598

    We're happy to take a look, but as per the forum rules, please link to a test case - a test case that replicates the issue will ensure you'll get a quick and accurate response. Information on how to create a test case (if you aren't able to link to the page you are working on) is available here.

    Cheers,

    Colin

  • kthorngrenkthorngren Posts: 21,160Questions: 26Answers: 4,921
    Answer ✓

    What version are you using. Don't think class fas, which you have only on CSV, is available in 4. See this link.

    Kevin

  • lieyongchanglieyongchang Posts: 29Questions: 2Answers: 0
    edited December 2020

    Thanks @kthorngren for always pointing me in the right direction.
    I am going to leave the link that shows a working font awesome v5 , for anyone that encounters the same issue as me

  • lieyongchanglieyongchang Posts: 29Questions: 2Answers: 0

    for those wondering why the icons are black, that is becos i am using a free version

This discussion has been closed.