Product: PowerShell Universal
Version: 5.0.13
very simple page, displaying a table.
The data is an array.
Now if there are 2 items in the array that are identical, the table will show only one.
Why?
It seems it does a sort -unique over all properties.
An array or a table is supposed to contain multiple rows of the same data…
$page:foo=@{
data=0..0xf|%{@{ name="none"; value="none"}}
}
New-UDButton -id "button" -text "click" -onclick {
$page:foo.data=@()
$page:foo.data+=@{name="1";value="one"}
$page:foo.data+=@{name="2";value="two"}
$page:foo.data+=@{name="3";value="three"}
$page:foo.data+=@{name="3";value="three"}
$page:foo.data+=@{name="4";value="four"}
Sync-UDElement -id "table" -wait
} -ShowLoading
$columns=@(
New-UDTableColumn -Property name
New-UDTableColumn -Property value
)
New-UDTable -id "table" -Dense -columns $columns -loaddata {
$tdc=$page:foo.data.count
$page:foo.data | Out-UDTableData -Page $EventData.Page -TotalCount $tdc -Properties $EventData.Properties
}