Getting the rows shown in a table via API and custom button

Getting the rows shown in a table via API and custom button

M_MM_M Posts: 1Questions: 1Answers: 0

So I have a datatable, and have a custom button that performs an action ($.fn.dataTable.ext.buttons.alert = {...}) and I'm trying to get only the rows shown in the table at the time. That logic is performed via a custom search piece ($.fn.dataTable.ext.search.push(...)). That being said, when in my custom logic in the buttons area, and I use the passed in 'dt' object, dt.rows({search: "applied"}).data() brings back the entire set, not just what's been filtered and shown in the table. Am I missing something, or should I be doing something different to grab just the shown rows in the table?

Thanks folks - M

This discussion has been closed.