jjcarrier / PS-TableUI

A simple PowerShell UI for working with selections of objects
MIT License
9 stars 1 forks source link

Incorrect handling of non-string members #20

Closed jjcarrier closed 10 months ago

jjcarrier commented 10 months ago

If the table data contains members that are (for instance) and integer type, the table rendering will not be handled correctly.

An example that would be good to support would be (on a Linux system):

$items = [PSCustomObject[]]@(Get-Process)
$selections = @(); Show-TableUI -Table $items -Selections ([ref]$selections) -DefaultMemberToShow @('Name', 'CPU', 'Id')

NOTE: In practice, this has another issue that need to be addressed/considered. In this case, the data values are dynamic which means column resizing may need to be adjusted between UI updates. This is trivial to change, but performance impact should be considered before applying such a change.