Responsive Not Workings

Responsive Not Workings

pushlinepushline 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

  • pushlinepushline Posts: 8Questions: 1Answers: 0

    And for some reason the entries on the page is broken with the arrow behind the number

  • kthorngrenkthorngren Posts: 21,330Questions: 26Answers: 4,951

    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

  • pushlinepushline Posts: 8Questions: 1Answers: 0

    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

  • kthorngrenkthorngren Posts: 21,330Questions: 26Answers: 4,951

    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

  • pushlinepushline Posts: 8Questions: 1Answers: 0

    Doing console.log($.fn.dataTable.version); returns me 2.0.8

  • kthorngrenkthorngren Posts: 21,330Questions: 26Answers: 4,951
    edited June 28

    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

  • pushlinepushline Posts: 8Questions: 1Answers: 0

    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

  • pushlinepushline Posts: 8Questions: 1Answers: 0

    I'm using webpack compiler btw, its "outside" laravel scope.

  • kthorngrenkthorngren Posts: 21,330Questions: 26Answers: 4,951
    Answer ✓

    Inspecting the table the width is set to a static value, for example:

    <table id="clansTable" class="display dataTable dtr-inline" aria-describedby="clansTable_info" style="width: 707px;">
    

    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 the table tag as shown in this example.

    Kevin

  • pushlinepushline Posts: 8Questions: 1Answers: 0

    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.

  • kthorngrenkthorngren Posts: 21,330Questions: 26Answers: 4,951

    I'll put a static width on the select too, idk why its so small.

    Not sure what you are referring to.

    Responsive seems to be working now.

    Kevin

  • pushlinepushline Posts: 8Questions: 1Answers: 0

    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

Sign In or Register to comment.