Reproducible Bug report with example: Excel button disappears

Reproducible Bug report with example: Excel button disappears

fegufegu Posts: 2Questions: 1Answers: 0

Link to test case: https://jsfiddle.net/fegu/ah45ucpf/3/
Debugger code (debug.datatables.net): none
Error messages shown: none
Description of problem: Everything works fine on initial load. But after clicking paging, page size or sorting, the Excel export button (placed at bottom of datatable) disappears.

I have tried re-adding it on draw event (see last code line with comment), but while it does appear it does not work (nothing happens on click).

Using all latest versions.

Have tried quite a bit of workarounds, but found none. Can someone point me in the right direciton?

This question has an accepted answers - jump to answer

Answers

  • kthorngrenkthorngren Posts: 11,025Questions: 25Answers: 2,524
    Answer ✓

    Maybe you can just use the dom option. See this updated example:
    https://jsfiddle.net/yen8sbg2/

    Commented out the statement you have to add the buttons and added dom:'lftriBp',.

    Kevin

  • fegufegu Posts: 2Questions: 1Answers: 0

    That does indeed work, thank you! I did try this at first since it is the canonical way, but it messed with my layout initially. I can see that is not the case now, perhaps I gave up on DOM too soon, I remember reading somewhere that direct insertion was the way to go when using Bootstrap. Anyway, thanks for this workaround!

Sign In or Register to comment.