Tabs empty in 3.7.3

Product: PowerShell Universal
Version: 3.7.3

After upgrading to 3.7.3 (from 3.6.4) I am missing all content in a set of tabs (other than the first one). I’ve tried removing all but a New-UDTypography in a tab, but nothing shows up.

Downgrading back to 3.6.4 restored the content.

Can you provide a snippet of your tab script? I only ask because the samples dashboard uses tabs extensively and it doesn’t have this problem.

    
            New-UDTabs -RenderOnActive -Tabs {
                New-UDTab -Text 'Demo' -Icon (New-UDIcon -Icon eye) -Content {
                    New-UDElement -Tag 'div' -Content {} -Attributes @{
                        style = @{
                            height = "20px"
                        }
                    }
                    & $Content 
                }
                New-UDTab -Text 'Code' -Icon (New-UDIcon -Icon code) -Content {
                    $Code = $Content.ToString()
                    $Lines = $Code -split '\r?\n'
                    $FirstLine = $Lines | Select-Object -First 1 -Skip 1
                    $StartingWhiteSpace = $FirstLine.Length - ($FirstLine.TrimStart().Length)
    
                    $Code = ''
                    $Lines | ForEach-Object {
                        if ($_.Length -ge $StartingWhiteSpace) {
                            $Code += $_.Substring($StartingWhiteSpace) + ([Environment]::NewLine)
                        }
                    }
    
                    New-UDButton -Icon (New-UDIcon -Icon 'Copy') -Style @{
                        right = 0
                    } -OnClick {
                        Set-UDClipboard -Data $Code
                        Show-UDToast -Message 'Copied!'
                    }

                    New-UDSyntaxHighlighter -Code $Code -Style 'oneDark' -ShowLineNumbers
                }
                New-UDTab -Text 'Help' -Icon (New-UDIcon -Icon CircleQuestion) -Content {
                    New-UDExpansionPanelGroup -Content {
                        $Command | ForEach-Object {
                            New-UDExpansionPanel -Title "     $_" -Content {
                                New-UDElement -Tag 'pre' -Content {
                                    $CommandName = $_
                                    New-UDDynamic -Content {
                                        #Get-Help -Name $CommandName -ErrorAction SilentlyContinue -Full | Out-String
                                    }
                                } -Attributes @{
                                    style = @{
                                        overflowX = "scroll"
                                    }
                                }
                            }
                        }    
                    }
                } -Dynamic
            }
        }

I also tried removing -RenderOnActive and it still works.

I’ll post it on the support case, and circle back here once we have some idea what’s going on.

1 Like

The issue was that the individual tabs were -Dynamic and the New-UDTabs didh’t specify -RenderOnActive.

Not sure why this worked in 3.6.4 (and earlier) but adding -RenderOnActive fixed things up.