Possible race condition when using Ajax data source
Possible race condition when using Ajax data source
I'm now using a datatable with an ajax source.
On the render of various columns I'm adding spans to provide bootstrap popover functionality and also on the last column I'm adding a variable bunch of anchors (depending on the data) to provide 'action' links which I'm then binding in the draw.dt event. I'm also setting up the popovers in the draw.dt event.
What I'm seeing is that on some renderings of the table (with the same table data), the width of the table goes over page width and I get a horizontal scroll bar.
This behaviour seems to depend on the timing of the getting of the data from the ajax call and the draw (in fact as soon as I put a console log in the draw.dt and the xhr.dt event, the issue goes away). It's like the table is drawn without knowledge of the 'size' of the contents of the data and then the data is returned and the dynamic sizing goes awry.
I've done a search but I guess my google-fu isn't up to the task so sorry if this has been answered already.
I'll post up code if it's necessary.
Thanks in advance for any clues.
Answers
We would need a link to a test page that shows the issue to be able to help resolve this one I think.
Allan
Okay, will try to get something up.