Closed timoline closed 1 month ago
We almost need a new property called -ActiveTab
. Then we could gather the $query and get the tab name and then pass it into the New-UDTabs cmdlet.
I understand you labelled it as low prio, but for our customers is this the nr1 feature request. How can I motive you to give it more love/prio? (create a support ticket?)
We also have a priority for this, as otherwise tabs are not completely usable for us in many places and we have so far built a workaround using buttons, among other things. I thought I had also opened an issue about this last year, but I was probably wrong. In any case, we are also very interested in this and look forward to its implementation. Thank you very much.
Here's an example that work with the current release. We can look at implementing this directly.
New-UDApp -Content {
$Tabs = @(
New-UDTab -Text 'Tab1' -Id 'tab1' -Content {
"Tab 1"
}
New-UDTab -Text 'Tab2' -Id 'tab2' -Content {
"Tab 2"
}
New-UDTab -Text 'Tab3' -Id 'tab3' -Content {
"Tab 3"
}
)
$hash = Invoke-UDJavaScript "window.location.hash"
$SelectedTabIndex = 0
if ($hash -ne $null)
{
for ($i=0; $i -lt $tabs.Length; $i++){
if ($tabs[$i].id -eq $hash.TrimStart('#'))
{
$SelectedTabIndex = $i
}
}
}
New-UDTabs -Tabs {
$Tabs
} -SelectedTabIndex $SelectedTabIndex
}
-SelectedTabIndex isn't in the Tabs doc page or online cmdlet doc for New-UDTabs
Also, the New-UDTabs link at the bottom of the Tabs topic goes to New-UDStepper:
Will get those items fixed. Not sure why it didn't get into the cmdlet help because that should just be auto-generated. We even push a PR during release to update that repo.
This has been implemented in the code base as well. This work around won't be necessary in 4.3.3.
Works perfect!! (in 4.3.3) Thank you for the quick implementation.
Version
4.3.0
Severity
Low
Environment
IIS
Steps to Reproduce
Hello, I want to link to a page to a specific tab (within psu) Normally you can use # in the url, but it doestn't work.
Maybe I do something wrong, or maybe it's a bug?
Expected behavior
Actual behavior
Additional Environment data
No response
Screenshots/Animations
No response