ironmansoftware / issues

Public Issue tracker for Ironman Software products.
https://ironmansoftware.com
31 stars 2 forks source link

The Data Grid filters do not function correctly for columns that contain spaces #3432

Open gshykhov opened 3 days ago

gshykhov commented 3 days ago

Version

4.3.1

Severity

Medium

Environment

msi

Steps to Reproduce

I use the New-UDDataGrid function to display a dataset with white spaces in the fields. The filter is not working when applied on these columns, it throws error. I suspect that the issue is with the Out-UDDataGridData function.

Here is an app to reproduce the issue.

New-UDApp -Title 'PowerShell Universal' -Content {
    New-UDDataGrid -LoadRows {
        $Data = @(
            @{ 'User Name' = 'Adam'; Number = Get-Random }
            @{ 'User Name' = 'Tom'; Number = Get-Random }
            @{ 'User Name' = 'Sarah'; Number = Get-Random }
        )
        $Data | Out-UDDataGridData -Context $EventData
    } -Columns @(
        New-UDDataGridColumn -Field 'User Name'
        New-UDDataGridColumn -Field 'Number'
    ) -Id 'dataGrid1'
} -HideUserName

Expected behavior

Columns with spaces are filtered correctly and without errors.

Actual behavior

Filtering columns with white spaces throws errors, and the filtering does not happen.
Please see the attached GIF.

Additional Environment data

No response

Screenshots/Animations

psu_data_grid_issue