Search Push has a limit of 10 columns
Search Push has a limit of 10 columns
shanks
Posts: 2Questions: 1Answers: 0
in DataTables
whenever I use:
$.fn.dataTable.ext.search.push(function(settings, data, dataIndex) {});
the data is limited to 10 columns, why is that? I'm unable to filter by any column that comes after.
How can I increase the size?
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
There is no limit to the number of columns. The second parameter (
data
in your case) is an array of column data. See this example with 18 columns:http://live.datatables.net/pokemuce/1/edit
Please provide a link to your page or a test case showing the issue so we can help debug.
https://datatables.net/manual/tech-notes/10#How-to-provide-a-test-case
Kevin
Thank for your answer so it turned out that the limit is based on the columns being displayed so I needed to have a <th> and hide it so it shows up on the search filter.
You don't have to add hidden columns for the search plugin. There are more parameters than you are using. Take a look at the search plugin docs and you will see five parameters. The
rowData
parameter will contain the original data source for the row. See this updated example:http://live.datatables.net/pokemuce/2/edit
Kevin