Vertical page fitting - Error
Vertical page fitting - Error
gustavorieg
Posts: 6Questions: 0Answers: 0
I have a problem using this CDN:
https://cdn.datatables.net/plug-ins/1.13.7/features/pageResize/dataTables.pageResize.min.js
The page does not update the number of rows in my table depending on the screen size.
It removes all rows from the table leaving just one
Replies
All of the examples in the blog seem to be working. I would start by looking for errors in the browser's console.
We will need to see the problem to help debug. Please post a link to your page or a test case replicating the error.
https://datatables.net/manual/tech-notes/10#How-to-provide-a-test-case
Kevin
my code is normal, without any errors:
printscrenn
As Kevin requested, please link to a page showing the issue so we can help to debug it.
Allan
https://live.datatables.net/vigowahe/1/edit
Is this link ok?
Sorry, the link I took the example from is this:
https://datatables.net/blog/2015-04-10
Your test case doesn't run to show the issue. I built one for you:
https://live.datatables.net/qemelowo/1/edit
I believe the test case meets all the requirements of the plugin. Resize the page and you will see only one row displayed in the table. Also on page load it displays only 7 rows. @allan will need to take a look at the plugin code.
Kevin
The container doesn't have a height specified, so there is nothing to match the height of. If I set it to the viewport height it works: https://live.datatables.net/kofuhohi/1/edit .
Allan
I may have missed it but I didn't see anything in the blog indicating this requirement. If its not in the doc nd its appropriate can the requirements be updated to include that the container needs a height specified?
Kevin
Yup, good point. I'd thought some words to that effect were in there, but apparently not! I've added:
to the requirements section in my git repo and it will be deployed soon.
Allan
if I prefer to activate scrolling in my table, and for it to occupy 100% of my parent div, and be flexible. how to make?
I'm declaring my Y at 40vh, in case I want to apply 80vh to another screen size?
Maybe the solution in the first blog I linked to will do what you want.
Kevin