Lazy loading table in bootstrap tabs?
Lazy loading table in bootstrap tabs?

Hello,
I would love to use several tables in bootstrap tab, but I would also like to load only the table that is present in the tab I clicked and reload each time the same tab becomes active again.
I tried to do this on several events tabs: the click, when displayed ....
But I can not reload my table and destroy the table of the previous active tab.
Do you have any tips on how best to implement what I'm trying to do?
thanks in advance
This discussion has been closed.
Answers
Sorry for the double message masi if you want to see my code I can provide it maybe it will help you understand my request.
thanks in advance
Hi @shishi666 ,
This thread here might help. There's an example of a BS event,
shown.bs.tab
, which I imagine you could also use to initialise the table when it's shown,Cheers,
Colin
thanks for your answer
I read this post before asking my question is that I do not know the number of tabs there will be on the page. Here is my code:
And JS :
thanks in advance
Hi @shishi666 ,
There's a lot going on there. 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