DataTable Export Not showing Loader
DataTable Export Not showing Loader
Tejaswinij
Posts: 2Questions: 2Answers: 0
I wanted to show the Export button on different location as per my UI requirement, so I have customized the location of Export button of DataTable. using below code.
Export takes some time, so I want to show loader image while Exporting takes place. Export takes time but loader image not getting displayed.
But If I debug the JS loader image gets displayed.
Can someone guide me here.
`$(function () {
$('.Export').on('click', function () {
$("#loaderImage").show();
$("div#divExportButton button").click();
$("#loaderImage").hide();
}); /* Export Grid */
});`
This discussion has been closed.
Answers
Hi @Tejaswinij ,
We're happy to take a look, but as per the forum rules, please link to a test case - a test case that replicates the issue will ensure you'll get a quick and accurate response. Information on how to create a test case (if you aren't able to link to the page you are working on) is available here.
Cheers,
Colin
You most likely need to use a
setTimeout
immediately after theshow
to break the thread and let the browser render the loader image, before it then processes the click action. But as Colin says, we'd need a test to be certain.Allan