After ColReorder, .dt-Button-collection list (with bootstrap) loses anchor dom

After ColReorder, .dt-Button-collection list (with bootstrap) loses anchor dom

adam.phillipsadam.phillips Posts: 5Questions: 0Answers: 0

Hi, using colReorder and colVis on your bootstrap integration. I've noticed that after I drag and drop and column using colReorder that the re-ordering works great but that the <a> tags within the <li class="dt-button"></li> disappear and so my css no longer looks ok.

Thanks

Replies

  • allanallan Posts: 63,489Questions: 1Answers: 10,470 Site admin

    Could you give me the link in question please? I don't actually see a Bootstrap ColReorder + Buttons column visibility example. I'd just like to see exactly what is happening first.

    Allan

  • adam.phillipsadam.phillips Posts: 5Questions: 0Answers: 0

    Hi Allan, apols it took me so long to re-post. I clean forgot to check back to see if someone had commented (me bad).

    Anyhow, here's a quick fiddle showing the issue, the column selection button is in the top left:

    https://jsfiddle.net/philliad/tsncr6qz/3/

    Once a user re-orders the columns the styling of the DT collection goes up the swanny.. and i've narrowed it down to the <a> tags within the dt-button class disappearing.

    PS - datatables rocks.

    On a separate issue with the column vis button i've noticed that I can't close the DT button collection when viewing on my iphone... i'lll have a hunt around the forums to see if this has been raised before. thanks, Adam

  • allanallan Posts: 63,489Questions: 1Answers: 10,470 Site admin

    Thanks for the fiddle - I'll get back to you on this!

    PS - datatables rocks.

    Thanks. Brings a smile at the end of a long day :-)

    On a separate issue with the column vis button i've noticed that I can't close the DT button collection when viewing on my iphone

    This was just reported a day or two ago. Fix here.

    Allan

  • tiendqtiendq Posts: 9Questions: 0Answers: 0

    I got this same issue too, once you reordered a column then ColVis column list is redrawn and the most inner a tag is missed.

  • chawkchawk Posts: 6Questions: 1Answers: 0

    I am also having this same issue. Thanks for taking a look at it.

  • allanallan Posts: 63,489Questions: 1Answers: 10,470 Site admin

    Fix committed here and is now in the nightly version. It will be included in the next release.

    Regards,
    Allan

  • tiendqtiendq Posts: 9Questions: 0Answers: 0

    Thanks Allan, it's a great news since I had tried to fix it myself but failed then the related website function has ben suspended.

  • adam.phillipsadam.phillips Posts: 5Questions: 0Answers: 0

    thanks Allan, much appreciated.

  • tiendqtiendq Posts: 9Questions: 0Answers: 0

    I think this fix introduced a new issue: ColVis column list is no longer updated when reordering column.

    This example doesn't work: http://datatables.net/extensions/colreorder/examples/integration/colvis.html

  • allanallan Posts: 63,489Questions: 1Answers: 10,470 Site admin

    Yes - this is correct. There was a problem with columns being excluded from the list when combined with column reordering. So unfortunately, I've had to update the code to not reorder the columns in the visibility list - i.e. the original order is retained.

    That is an issue I will look at addressing in the next release.

    Allan

  • adam.phillipsadam.phillips Posts: 5Questions: 0Answers: 0

    hi, am thinking this may have introduced another issue. If I drag any column (so long as it's not the furthest right one) to the very right hand side, the width of the table doesn't extend full width (for some reason) but if I then try to drag that column back to where it originally came from the data in the column moves ok but the column header stays temporarily on the far right. I noticed this originally as I was implementing a button to revert the user to the original layout and it threw this up which can be replicated manually.

  • allanallan Posts: 63,489Questions: 1Answers: 10,470 Site admin

    Does that occur for you in this example? I've just tried it and it seems to work okay (I think!).

    Allan

  • adam.phillipsadam.phillips Posts: 5Questions: 0Answers: 0

    the example is fine. Interestingly, on the admin tool i'm building the first dataTable is fine too... but the 2nd, 3rd and 4th have this issue and at the moment I can't isolate why. will carry on trying to figure it out.

  • allanallan Posts: 63,489Questions: 1Answers: 10,470 Site admin

    Are the others hidden initially? I'm not sure if that will cause the issue, but it might be something to start with.

    Allan

This discussion has been closed.