Table width

Table width

ReggieTheDogReggieTheDog Posts: 4Questions: 1Answers: 0

Hi, Totally noob to data tables and am struggling. I'm creating a couple of tables at 48% width within a container. One table on the left of the page, the other on the right. Starts off great when page loads. I've only got the left table at present, loaded with the example data. The moment I click the table heading to sort the data, the table immediately expands to 100% of the container width. I added
'''$("#basic").on("column-sizing.dt",function(e,settings){
console.log( 'Column width recalculated in table');
}); '''
to see if something triggers it but get no console output. Can someone explain what I'm doing wrong?

Answers

  • colincolin Posts: 15,240Questions: 1Answers: 2,599

    Hi @ReggieTheDog ,

    We're happy to take a look, but as per the forum rules, please link to a test case - a test case that replicates the issue will ensure you'll get a quick and accurate response. Information on how to create a test case (if you aren't able to link to the page you are working on) is available here.

    Cheers,

    Colin

  • ReggieTheDogReggieTheDog Posts: 4Questions: 1Answers: 0

    @colin Thank for getting back to me so swiftly. In trying to create a test case I worked out what the problem was and am now thankfully making some progress. The fault was between the seat and the keyboard.
    live.datatables.net really helped so thanks for the steer. If I face future challenges I will of course go via the test case route. Thank you again for your kind support.

This discussion has been closed.