Go to page having row with specific value
Go to page having row with specific value
mazing
Posts: 5Questions: 3Answers: 0
I use https://github.com/aldeed/meteor-tabular which ports DataTables to Meteor.
I want to go page having a row with a specific value. I have tried
// get data table instance
var dataTable = $('table').DataTable();
// get position of selected row
var rowPosition = dataTable.column( 0, { order: 'current' } ).data().indexOf( "the value i'm searching for" );
The problem is that dataTable.column( 0, { order: 'current' } ).data()
only contains values of the rows on the specific page because the rest of the data is not subscribed to the client.
What can I do to search for the value in all rows?
I guess I should use
dataTable.column( 0, { order: 'current' } ).search( "the value i'm searching for" )
instead of
dataTable.column( 0, { order: 'current' } ).data()
This discussion has been closed.
Answers
.