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' }
}
}