table search results showing on the second page
table search results showing on the second page
Hi,
I'm using the search function on a specific column using this code snippet:
oTable.column( 5 ).search( search_string, true, false ).draw();
The search string is "Magic Command Fest"
I am selecting to show 25 results per page.
The first page tells me there are no results. I have to go to page 4 to see the filtered result.
Here is where you can reproduce the error:
https://judgeacademy.com/events/
Select a category "Magic Command Fest"
How I can render the valid results on the first page of the table?
Thanks,
Joanna
This question has an accepted answers - jump to answer
Answers
Your "Category" column is actually column 6.
Interesting. It looks like it, but this is the column index that filters that column.
You have server side processing enabled. Your server scrip tis responsible for searching, sorting and paging. When you search you can see this search term sent along with all the other SSP parameters:
The XHR response looks like this:
Your server script isn't returning the rows for the page.
You have 139 rows in the table which means you don't need to enable server side processing. Try disabling it to load all the rows in the client and allow the client to perform searching, sorting and apging.
KEvin
Thanks! I was able to track down the column number discrepancy and fix the problem.