Badgerati / Pode.Web

Web template framework for use with the Pode PowerShell web server
MIT License
183 stars 23 forks source link

Active Tab parameter #548

Open Staples1887 opened 4 months ago

Staples1887 commented 4 months ago

Description of the Change

Related Issue

542

Examples

$tabs = New-PodeWebTabs -ActiveTab "Tab2" -Tabs @(
    New-PodeWebTab -Name Tab1 -Content @(
        New-PodeWebContainer -Content @(
            New-PodeWebText -Value 'Hello World'
        )
    )
    New-PodeWebTab -Name Tab2 -Content @(
        New-PodeWebContainer -Content @(
            New-PodeWebText -Value 'Hello There'
        )
    )
    New-PodeWebTab -Name Tab3 -Content @(
        New-PodeWebContainer -Content @(
            New-PodeWebText -Value 'Hi!'
        )
    )
)

Additional Context

While the change effects PodeCyclingElement and PodeCyclingChildElement if the active element is not past then it defaults to the previous behaviour, first child is active.