How to get input value inside datatable with paging set true
How to get input value inside datatable with paging set true

I have input type number inside datatable and i have to use paging true because i have -+ 500 record. i use this code to get input value, but only get the current page not all page.
let detail = [];
$.each($datatable.rows().data(), function (i, row) {
detail.push({
entity_code: $entityCode.val(),
branch_code: $branchCode.val(),
subbranch_code: row[0],
code: row[1],
stock: $(`tbody input.stock:eq(${i})`).val()
});
});
and this how i draw the table:
$.each(res.results, function (i, val) {
$datatable.row.add([
val.subbranch_code,
val.code,
val.name,
`<input type="number" class="form-control form-control-sm stock" value="${val.stock}">`
])
});
$datatable.draw()
is there any way how i get all data from all page?
This discussion has been closed.
Answers
This thread should help, it's asking the same thing.
Cheers,
Colin