Keep custom Editor layout from flashing before table loads? Chrome

Keep custom Editor layout from flashing before table loads? Chrome

EnaldiEnaldi Posts: 6Questions: 2Answers: 1
edited April 2017 in Free community support

What's the best way to keep a custom Editor template from displaying briefly on the page before the main datatable is drawn? I can see this happening even in the example: https://editor.datatables.net/examples/simple/template.html

Edit: I can see this happening in Chrome. I don't think it's happening in IE (but hard to tell, because our IE is sluggish.)

Thanks in advance!

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 63,237Questions: 1Answers: 10,418 Site admin
    Answer ✓

    Add style="display:none" as an attribute to the element.

    You might not see it in IE, ironically, because it is sluggish. It doesn't have time to redraw before Editor has removed it!

    Regards,
    Allan

  • EnaldiEnaldi Posts: 6Questions: 2Answers: 1

    Thanks! Just setting the style alone hid the content from my editor form as well, so I used a class that I can remove when the editor opens:

    $('.vipNoDisplay').removeClass('vipNoDisplay');

  • allanallan Posts: 63,237Questions: 1Answers: 10,418 Site admin

    Ah - thanks for pointing that out. I had thought Editor would remove the hidden display. i'll look into that!

    Regards,
    Allan

This discussion has been closed.