If change input value in datatable with jquery it doesn't export correctly

If change input value in datatable with jquery it doesn't export correctly

jdanignjdanign Posts: 4Questions: 2Answers: 0
edited December 2020 in Free community support

I'm using this:

body: function ( data, row, column, node ) {
    return (column >= 1 && column <= habitosCount) ?
    $(data).find('input').val():
    data;
}

It exports correctly, but when I change the value with jquery and I press the excel export button, the excel file keeps the previous value.

Answers

  • jdanignjdanign Posts: 4Questions: 2Answers: 0

    Finally I can do it using node parameter, not data in ($(node).find('input').val():):

    body: function ( data, row, column, node ) {
        return (column >= 1 && column <= habitosCount) ?
        $(node).find('input').val():
        data;
    }
    
This discussion has been closed.