Hi there,
I am using 4.2.0
I noticed that Get-UDelement stopped working on tables with big tables (not so big)
For example, the following code:
New-UDApp -Title 'PowerShell Universal' -Content {
$Data = @(
@{Dessert = 'Frozen yoghurt'; Calories = 159; Fat = 6.0; Carbs = 24; Protein = 4.0 }
@{Dessert = 'Ice cream sandwich'; Calories = 159; Fat = 6.0; Carbs = 24; Protein = 4.0 }
@{Dessert = 'Eclair'; Calories = 159; Fat = 6.0; Carbs = 24; Protein = 4.0 }
@{Dessert = 'Cupcake'; Calories = 159; Fat = 6.0; Carbs = 24; Protein = 4.0 }
@{Dessert = 'Gingerbread'; Calories = 159; Fat = 6.0; Carbs = 24; Protein = 4.0 }
@{Dessert = 'Frozen yoghurt'; Calories = 159; Fat = 6.0; Carbs = 24; Protein = 4.0 }
@{Dessert = 'Ice cream sandwich'; Calories = 159; Fat = 6.0; Carbs = 24; Protein = 4.0 }
@{Dessert = 'Eclair'; Calories = 159; Fat = 6.0; Carbs = 24; Protein = 4.0 }
@{Dessert = 'Cupcake'; Calories = 159; Fat = 6.0; Carbs = 24; Protein = 4.0 }
@{Dessert = 'Gingerbread'; Calories = 159; Fat = 6.0; Carbs = 24; Protein = 4.0 }
@{Dessert = 'Frozen yoghurt'; Calories = 159; Fat = 6.0; Carbs = 24; Protein = 4.0 }
@{Dessert = 'Ice cream sandwich'; Calories = 159; Fat = 6.0; Carbs = 24; Protein = 4.0 }
@{Dessert = 'Eclair'; Calories = 159; Fat = 6.0; Carbs = 24; Protein = 4.0 }
@{Dessert = 'Ice cream sandwich'; Calories = 159; Fat = 6.0; Carbs = 24; Protein = 4.0 }
@{Dessert = 'Eclair'; Calories = 159; Fat = 6.0; Carbs = 24; Protein = 4.0 }
)
$Columns = @(
New-UDTableColumn -Property Dessert -Title "A Dessert" -ShowFilter
New-UDTableColumn -Property Calories -Title Calories
New-UDTableColumn -Property Fat -Title Fat
New-UDTableColumn -Property Carbs -Title Carbs
New-UDTableColumn -Property Protein -Title Protein
New-UDTableColumn -Property Test1 -Title Test1 -Render {
New-UDIcon -Icon diks
}
New-UDTableColumn -Property Test2 -Title Test2 -Render {
New-UDIcon -Icon diks
}
)
New-UDTable -Data $Data -Columns $Columns -Id 'table2' -Sort -Export -PageSize 5 -ShowSearch -ShowPagination -Dense -ToolbarContent {
New-UDButton -Text 'test'
}
New-UDButton -Text 'test' -OnClick {
$value = Get-UDElement -Id 'table2'
Show-UDToast $($value | Out-String)
}
} -HideUserName
While pressing on a “test” button that tries to get the table element, gives in the logs the following error:
Exception calling “SendWebSocketMessageWithResult” with “3” argument(s): “Connection ‘mKmBJuE1_jeeL9H9rYBuXw’ disconnected.”
Does someone have a workaround for it?