UDTabs RenderOnActive Behavior?

So my expectation of RenderOnActive is that it wouldn’t execute the scriptblock of the tab until I focus on the tab. However, the below takes 5 seconds (note the sleep 5 on the second “non-active” tab) rather than returning immediately.

Am I misunderstanding how RenderOnActive is supposed to work? Does it still generate all the data but only not “render” in the browser until it is called?

New-UDDashboard -Title 'OK' -Content {
    New-UDTabs -RenderOnActive -Tabs {
        New-UDTab -Text 'Item One' -Content { New-UDTypography -Text 'Item One' -Variant 'h2' }
        New-UDTab -Text 'Item Two' -Content { Sleep 5;New-UDTypography -Text 'Item Two' -Variant 'h2' 
   }
        New-UDTab -Text 'Item Three' -Content { New-UDTypography -Text 'Item Three' -Variant 'h2' }
    }
  }

This is wonky but try adding -Dynamic to your tabs.

New-UDDashboard -Title 'OK' -Content {
    New-UDTabs -RenderOnActive -Tabs {
        New-UDTab -Text 'Item One' -Content { New-UDTypography -Text 'Item One' -Variant 'h2' } -Dynamic
        New-UDTab -Text 'Item Two' -Content { Sleep 5;New-UDTypography -Text 'Item Two' -Variant 'h2' 
   } -Dynamic
        New-UDTab -Text 'Item Three' -Content { New-UDTypography -Text 'Item Three' -Variant 'h2' } -Dynamic
    }
  }

I opened an issue for this a couple days ago because it’s weird and we need to resolve this…some how…

Thanks Adam, but -Dynamic didn’t work for me with 3.1.3 framework and PSU 1.4.5, it still took 5 seconds to load, unless I did something wrong but I straight cut and paste your code.