Tab 'When First Shown' actions triggered on pageload

  • 1
  • Problem
  • Updated 3 years ago
  • (Edited)
It seems that if a tabset is set NOT defer rendering of tab contents, the 'When First Shown' actions for the tab are run immedately on pageload. That's not what I would expect...
Photo of Matt Sones

Matt Sones, Champion

  • 31,478 Points 20k badge 2x thumb

Posted 3 years ago

  • 1
Photo of Matt Sones

Matt Sones, Champion

  • 31,478 Points 20k badge 2x thumb
Is there any way I can have the tabset not defer rendering of contents and still 'lazy load' a page include?
Photo of J.

J., Official Rep

  • 7,470 Points 5k badge 2x thumb
Matt,

Are you wanting just the Page Include lazy loaded so that it's the only tab with a delay when the User clicks on it? Right now, there isn't a way to do that.

"When First Shown" actions can also be thought of as "When First Rendered" actions. I think the reason for this is that even if your tab isn't selected (i.e. visible), the components contained on it may need an action in your "When First Shown" actions to be run (e.g. a Table that needs a model queried in order to render properly).
Photo of Matt Sones

Matt Sones, Champion

  • 31,478 Points 20k badge 2x thumb
J.--
Thanks for the response. I thought that i couldn't make the whole tabset defer because of some code we are running to track how long a user is on each tab (which originally required that all the tabs be rendered on pageload). I was able to adjust that code, so now I can defer rendering of all tabs.