ironmansoftware / powershell-universal

Issue tracker for PowerShell Universal
https://powershelluniversal.com
35 stars 3 forks source link

Table Selectedrows only includes values showing when table is filtered. #1761

Open MikeShepard opened 1 year ago

MikeShepard commented 1 year ago

Steps to Reproduce

New-UDDashboard -Title 'PowerShell Universal' -Content {
    new-uddynamic -id label -Content {
        new-udtypography -text ((get-udelement table).selectedrows.a -join ',' )
    }
        new-udtable -id table -showfilter -showselect -columns @(
        new-udtablecolumn -property a -ShowFilter 
        new-udtablecolumn -property b
    ) -data @{a=1;b=2},@{a=3;b=4} -OnRowSelection {sync-udelement -id label}

}
  1. Select the first row
  2. Note that the label shows 1 from the selectedrow property of the table
  3. Type "3" in the filter
  4. Select the only filtered row
  5. note that the label now shows 3 (as the only selected row value)
  6. clear the filter
  7. You can see that both rows are selected, but when the table was filtered, the selectedrow property wasn't correct.

Expected behavior

Expectation is that the selectedrows property is all of the selected rows, no matter what filter is in place.  The rows still exist even if they're not displayed.

Actual behavior

Selectedrows only includes rows showing in the current filter

Environment data

PowerShell Universal 3.5.5

Visuals

image

Omzig commented 1 year ago

If you remove the selected 'thing' from visibility, it should still be selected ;)

Omzig commented 7 months ago

@adamdriscoll, you fixed this between .7 and .12, not sure when, and it didn't show up in the change log, you might want to close this and #3005