Bug in Stepper and Table search?


In one of my steps I have a table that lists AD users for selection. The table contains 1000+ rows so I added the “ShowSearch” option and because the table is not a supported control I run a validation and write the result into a session variable.

Here’s the problem I noticed. If I select multiple users from the table without using the search e.g. by selecting multiple users on the first page or by navigating through the pages the “(Get-UDElement -Id “UserTable”).selectedRows” is actually retrieving all selected rows.
However if I run a search, select the user, search again and select another user the Get-UDElement only contains the last selected user.

Could someone confirm this issue? I can also open an issue on github if needed.

New-UDStepper -Steps {
New-UDStep -OnLoad {
$adusers = Get-AdUser -Server domain.local -filter * | Select-Object Name, UserPrincipalName, Mail
New-UDTable -Id “UserTable” -Title “Users” -Data $adusers -ShowPagination -PageSize 10 -ShowSearch -ShowSelection -Dense
} -Label “User Selection”
New-UDStep -OnLoad {
$session:userTableSelectedRows | Out-String
} -Label “Summary”
} -OnFinish {
New-UDTypography -Text ‘Nice! You did it!’ -Variant h3
} -OnValidateStep {
$userTableSelectedRows = (Get-UDElement -Id “UserTable”).selectedRows
if (($userTableSelectedRows | Measure-Object | Select-Object -ExpandProperty count) -ge 1)
$session:userTableSelectedRows = $userTableSelectedRows
New-UDValidationResult -Valid

Product: PowerShell Universal
Version: 1.5.15

Can anyone confirm this?

Sorry for not following up but this is definitely a bug.