reflow? Can I avoid it when making a datatable from the DOM?
reflow? Can I avoid it when making a datatable from the DOM?

I'm making a Datatable from a DOM table element. Everything works delightfully well save one user experience glitch:
The table element renders raw, then rerenders as a Datatable. The page reflows as the table morphs.
Is there a good way to suppress the first rendering? I tried hiding it in the HTML, then revealing it with .on('init.dt'...)
. But then the Datatable rendered narrower than my browser width.
Any suggestions?
This discussion has been closed.
Answers
Make sure you ave
style="width:100%"
on thetable
element as shown in this example. After revealing the table usecolumns.adjust()
as shown in this example.Kevin