Remove icon from added line

Remove icon from added line

klermannklermann Posts: 277Questions: 67Answers: 1
edited May 2018 in Free community support

Hello Allan, I'm adding a row to the datatable, but with it's being added the icons for actions ... How do I remove them?

var node = t.row.add({
                       pagamento : '',
                       dataDespesa : '',
                       grupos : '',
                       conta : '',
                       categoria : '',
                       descricaoDespesa : 'Valor Total ',
                       valorDespesa : valor,
                       cor : '',
                 }).order([6, 'asc']).draw().page('last').draw().node();
                 $(node).addClass('bg-blue-grey-50 font-weight-600');```

the column is displayed as null


```js
 {
                    data: null,
                    orderable: false,
                    className: "center",
                    defaultContent: '<a href="" class="editor_edit"><i class="icon wb-edit font-size-12 blue-grey-400" aria-hidden="true"></i></a> ' +
                    ' <a href="" class="editor_remove"><i class="icon wb-trash font-size-12 blue-grey-400" aria-hidden="true"></i></a>'
                }

https://prnt.sc/jnohpa

Answers

  • bindridbindrid Posts: 730Questions: 0Answers: 119

    here is how I would do it. (have not verified the css but you will get the idea)

    $(node).addClass('bg-blue-grey-50 font-weight-600');
    
    

    to

    $(node).addClass('bg-blue-grey-50 font-weight-600  added-row');
    

    then in the css

    .added-row .editor_remove, .added-row .editor_edit {
         display:none;
    
    }
    
    
    
This discussion has been closed.