How can I make the body of the datatable scroll, but retain column searching?
How can I make the body of the datatable scroll, but retain column searching?
Link to test case: http://live.datatables.net/kibokupu/3/edit?html,css,js,output
Debugger code (debug.datatables.net): None
Error messages shown: None
Description of problem:
1. If you type a few letters into the search field above a column in the test case, the searching/filtering works perfectly.
2. If, however, you uncomment the 11th line in the test case (scrollY: "20vh",) the scrolling works fine but the filtering no longer works.
Any ideas on how to go about enabling table body scrolling on searchable columns?
Thanks very much.
I am loving DataTables, btw! (I've built a way more complex datatable than in the example - in my first crack at it - and have only this step to take).
Gary
This question has an accepted answers - jump to answer
Answers
You have FixedHeader enables in your example. You aren't loading the extension in the test case but the FixedHeader docs state this:
See if this thread asking the same question about
scrollX
helps.Kevin
Thanks, Kevin!
If you're a js beginner or just as rusty as I am, here are the steps I took:
replaces
replaces
Sorry forgot to add the link: http://live.datatables.net/kibokupu/10/edit?js,console,output