Unable to get row data when table is responsive

Unable to get row data when table is responsive

sunil9040sunil9040 Posts: 1Questions: 1Answers: 0

Link to test case:
Debugger code (debug.datatables.net):
Error messages shown: undefined
Description of problem:

I have a button in my table which go down automatically in mobile view when i expand that and click on that button get triggers but row data does not come in my console what to do. I want to only target that specific button with calls here is the code. unable to target that button if i set it from expanded row than it does not work in collapse mode. I am throwing the values in the pop up form

$('#client-table').on('click','tr .feebutton',function(){
const rowdata = table.row(this).data()
const exampleModal = document.getElementById('transaction')
const cid = exampleModal.querySelector('.modal-body #cid')
const name = exampleModal.querySelector('.modal-body #tname')
console.log(rowdata)
cid.value = rowdata[1]
name.value = rowdata[3]
})

Answers

  • kthorngrenkthorngren Posts: 21,443Questions: 26Answers: 4,974

    The selector changes when in Responsive mode. See if this thread helps.

    Kevin

Sign In or Register to comment.