As shown here, the UDTable is longer than the UDCard and the list line is cut off (you can just barely see the top of the words below “MemberOf”). How do I make the UDCard grow to fit the size of whatever is in the table?
Here’s the code:
New-UDRow -Columns {
New-UDColumn -Size 12 -Content {
New-UDCard -Size large -Content {
New-UDRow -Columns {
New-UDColumn -Size 1 -Content {
New-UDElement -Tag "div" -Attributes @{ style = @{ height = "30px"}}
New-ADIcon -ObjectClass $Object.ObjectClass -Size 4x
}
New-UDColumn -Size 11 -Content {
New-UDTable -Title ($Object.GivenName + " " + $Object.SurName) -Headers @("Name", "Value") -Endpoint {
$SkippedProperties = @("PropertyNames", "AddedProperties", "ModifiedProperties", "RemovedProperties", "PropertyCount","SID","ObjectClass","ObjectGUID")
$Object.psobject.Properties | ForEach-Object {
if ($SkippedProperties.Contains( $_.Name))
{
return
}
$Value = $Null
if ($_.Value -eq $null)
{
$Value = ' '
}
elseif ($_.Value -is [Microsoft.ActiveDirectory.Management.ADPropertyValueCollection])
{
$Value = ($_.Value | ForEach-Object {
$_.ToString()
New-UDElement -Tag "br"
})
}
else
{
$Value = $_.Value.ToString()
}
[PSCustomObject]@{
Name = $_.Name
Value = $Value
} | Out-UDTableData -Property @("Name", "Value")
}
}
}
}
}
}
}