I have a table that I am using -FilterType select on a few columns. I have two questions (1 I think might be a bug) both related to refreshing the Table. To refresh the table, I have it wrapped in a New-UDDynamic and refresh it with a New-UDButton that -OnClick does a Sync-UDelement on the Dynamic.
-
If I specify an ID (New-UDTable -ID ‘TestTable’), Filtering behaves oddly after a refresh. If I have a column filtered, when I click the refresh button the column returns to its unfiltered state (expected) but the filter I have selected stays selected (unexpected). Then if I want to filter again, I have to unselect the filter and selected it again. This ONLY happens if I assign the table an -ID manually.
I’m assigning the table and ID because I’m doing a Get-UDelement -ID ‘TestTable’ to get the selected rows. My currently workaround is:
$testtable = New-UDTable -Data $testdata
$testtable
Get-UDElement -Id “$($testtable.id)”
If I do this to get around setting a -ID, filtering works as expected. -
Is there any way to store selected filters and re-aply them after a refresh? The report I generate is manipulated but selecting rows and changing data, so the table refreshes quiet often, and it a bit of a pain to have to keep reselecting filters.