Hi,
After upgrading to 1.4.6 the rendering is much faster.
Regarding the button in only one cell I made the following example of how it works today. I don’t know if there is a better way of doing it:
$TestButton1 = New-UDButton -Text "Button1" -OnClick {}
$TestButton2 = New-UDButton -Text "Button2" -OnClick {}
$Data= @(
@{"Name" = "Bob"; "Status" = ""; Value = $TestButton1 }
@{"Name" = "Robert"; "Status" = ""; "Value" = ""}
@{"Name" = "Bobby"; "Status" = $TestButton2; "Value" = "" }
)
$Columns = @(
New-UDTableColumn -Property Name -Title "Name" -Render {
$EventData.Name
}
New-UDTableColumn -Property Status -Title "Status" -Render {
$EventData.Status
}
New-UDTableColumn -Property Value -Title "Value" -Render {
$EventData.Value
}
)
New-UDTable -Id "TestTable" -Data $Data -Columns $Columns
This way I render each column and use the attribute from the $EventData for objects to be rendered.
I was on 1.4.4 before, where I had to convert $Body from JSON and then to a Hashtable (by a custom function) to be able to do the same.
I am unsure if this is the correct way to do it, or if there is a better way to do it?