Is there a way to have UDSelect component have more than 25 entries to select from? I’ve created the following dashboard where $Companies contains over 50 entries but I can only see 25 from the UDSelect component on the page.
New-UDDashboard -Title ‘Manage Per User Billing’ -Content {
New-UDForm -Content {
New-UDSelect -Id ‘Company’ -Label ‘Company’ -Option {
foreach($Company in $Companies) {
New-UDSelectOption -Name $Company.name -Value $Company.id
}
}
} -OnSubmit {
Show-UDToast $EventData.Company
}
}
adam
December 7, 2022, 6:27pm
2
I’m not seeing this on my machine. Can you double check the company list?
$Companies = 1..50 | ForEach-Object {
[PSCustomObject]@{
Name = "Name $_"
Id = $_
}
}
New-UDDashboard -Title "Manage Per User Billing" -Content {
New-UDForm -Content {
New-UDSelect -Id "Company" -Label "Company" -Option {
foreach ($Company in $Companies) {
New-UDSelectOption -Name $Company.name -Value $Company.id
}
}
} -OnSubmit {
Show-UDToast $EventData.Company
}
}
Thanks Adam. User error… My list was truncated and shows properly in the select object now.