Responsive Not Workings
Responsive Not Workings
pushline
Posts: 8Questions: 1Answers: 0
I can't provide the debugger as i'm using custom compiler in laravel but i can provide the code: https://pastebin.com/Kj7uFnJt
It's my first time using it and i didnt understand it very well
- everything in the .js or .css locates on resources/src/(js, css), so thats why the import is big -
This question has an accepted answers - jump to answer
Answers
And for some reason the entries on the page is broken with the arrow behind the number
There is nothing obvious from your code snippet. Look for errors in the browser's console. Use the Debugger to verify that Datatables and Responsive are being loaded.
Kevin
It says to me im using legacy dt while in my package.json i have the version 2.0.8 of DT and responsive one is 3.0.2
I'm not familiar with the Laravel compiler. Sounds like Datatables 1.9 is being loaded instead of the 2.0.8 you have defined. Refer to the Laravel docs to track down why the old version is being loaded.
Kevin
Doing console.log($.fn.dataTable.version); returns me 2.0.8
Do you see errors in the browser's console?
Without seeing the problem it wil be difficult to help troubleshoot. Can you post a screenshot showing the issue?
Better is to post a link to your page or a test case replicating the issue so we can help debug.
https://datatables.net/manual/tech-notes/10#How-to-provide-a-test-case
Kevin
No i don't see nothing in my console.
You can check it here - https://ucp.blood.ovh/clans
Screenshots - https://imgur.com/a/ZL82E9m
I'm using webpack compiler btw, its "outside" laravel scope.
Inspecting the table the width is set to a static value, for example:
Changing the page width doesn't affect the table width. You can see it is still 707px.
Removing the
element.style
causes the table to extend to the width of the container.Try adding
style="width:100%"
to thetable
tag as shown in this example.Kevin
Hmm. Ok, weird enough, i didnt put the width there.
I'll put a static width on the select too, idk why its so small.
Thanks.
Not sure what you are referring to.
Responsive seems to be working now.
Kevin
Go into the imgur link and scroll down a bit to see the second image, the select input was very small, and doing F12 on the tutorial tables i didn't see any default width on the classes of it