HTML 5 Attributes

HTML 5 Attributes

extjacextjac Posts: 13Questions: 6Answers: 0
edited October 2022 in Free community support

Is it possible to use HTML 5 attributes to pass render edit button?

ex:

            <thead class="">
                <tr>
                    <th data-data="id" >ID</th>
                    <th data-data="name">Name</th>
                    <th data-data="email">Email</th>
                    <th data-data="country_name">Country</th>
                    <th data-render=""></th>
                </tr>
            </thead>

This is the current standard DataTable code. But i want to use above instead....

"columns"       : [
                { data: null , render: function ( data ) 
                    {
                        return '<a href="'+app_url+'/clients/'+data.uuid+'/edit">' + data.id + '</a>' ;
                    }  
                },
                { data: "name"}, 
                { data: "email"}, 
                { data: null , render: function ( data ) 
                    {
                        return data.country  ;
                    }  
                },
                { data: null , render: function (  ) 
                    {
                        return `<i class="fas fa-chevron-right pr-2 float-right" ></i>` ;
                    }  
                }
],

Answers

Sign In or Register to comment.