columnText renders text, not html, when using colReorder and colVis and bootstrap
columnText renders text, not html, when using colReorder and colVis and bootstrap
Demo: https://jsfiddle.net/friek2k/fjwjfuxL/
In this demo, on first load, columnText appropriately renders the supplied html as html. However, if you try re-ordering the columns, then opening the columns dropdown again, the buttons are echoed as text - i.e. the html isn't rendered.
Any suggestions on how to remediate?
Thanks a lot
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
Thanks for the example, but that doesn't include ColReorder, and it's not Bootstrap. Please could you update it and provide instructions on how to demonstrate the issue.
Colin
I forgot to save the fiddle before linking d'oh.
Please see this updated version:
https://jsfiddle.net/of39st5r/
Thanks for that test case, that helped. I can see the issue, and yep, agreed, it looks wobbly. I've raised it internally (DD-1348 for my reference) and we'll report back here when there's an update.
Cheers,
Colin
Great - thanks a lot Colin. Actually a bit surprised it's never been flagged before!
Cheers
Just wanted to chime in and say a user reported this in our environment as well. I feel like I tested this throughly when I first implemented colreorder, so I have to imagine there was a regression in core datatables, as we have not updated the colreorder plugin since building our product.
If I end up bisecting through and finding what caused the regression, I will report back here...
On that note Colin, has there been any progress on finding a fix at all?
Thanks very much
Unfortunately not, we're heads down on another project right now, so haven't been able to spend any time on this. I've flagged it for next release, though I can't guarantee when that would be.
Colin
Ok no problem - thanks for getting back to me
I ended up not finding a regression, I think this bug has been here since I started my project in early 2019. What I ended up doing was using psudeo selectors (:before and :after) in CSS to get the DOM structure I needed vs relying on passing html directly. This allowed me to pass simple text again but still style things how I wanted.
Just to say that this issue has been fixed by this commit which will be included in the next Buttons release, which will drop soon.
Allan