reflow? Can I avoid it when making a datatable from the DOM?
reflow? Can I avoid it when making a datatable from the DOM?
OllieJones
Posts: 6Questions: 5Answers: 0
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?
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