paging controls not showing on loading
paging controls not showing on loading
Starvision1970
Posts: 4Questions: 0Answers: 0
Hello,
I have a DataTable where, after initial loading, the paging controls are not visible.
It's not until I do some kind of action, like sorting or changing the numbers per page, that they suddenly appear.
Any idea what can be the reason for this strange behaviour?
Thank you.
This discussion has been closed.
Replies
A link to your page or a test case would be need for us to help you debug.
https://datatables.net/manual/tech-notes/10#How-to-provide-a-test-case
Kevin
Sorry about that.
Here you go:
http://repak.cloudvisualizer.net/Catalogo/Prodotti/2
By the way.
I also noticed, that the sorting glyphs are not showing when published.
This is not the case in my development environment.
Any ideas on why this is happening?
Thank you.
You are getting an error when loading this file from line 14:
https://cdn.datatables.net/v/bs4/dt-1.10.19/datatables.min.css
If you open it in the web browser you get this error:
An error has occurred while attempting to build this file.
Try changing the version to
1.10.18
. 1.10.18 and 1.10.19 are the same version there was some packaging issues causing the 1.10.19. See this thread for more details:https://datatables.net/forums/discussion/53777/links-not-correct-on-cdn-page#latest
Kevin
Hi Kevin,
changing the version solved the glyph problem, but the pagination problem remains.
When loading the table the pagination controls doesn't show.
Only after doing some kind of interaction like sorting, does it become visible.
When I check the html, the pagination div is there, so it's a mystery to me what's going on.
You are getting this error in the browser's console:
jquery.dataTables.min.js:62 Uncaught TypeError: Cannot read property 'style' of undefined
The problem is you have
colspan="2"
in the first column of the second header.Datatbles needs a unique
th
to add listeners to the colspn config breaks this and causes the above error. More info can be found in the Complex Headers example. Removing the colspan and have a uniqueth
in the second header should resolve the issue.Kevin