New-UDDataGrid - custom export error

Hello,

i am trying to migrate most of my UDTables to UDDataGrid, at the moment i am stuck at the file export.
In 3.6.2 i will get this error (custom export example from the docs Data Grid - PowerShell Universal)

if a use this code

-OnExport {
    $Data = $EventData | Select-Object -Expand name 

    [string]$MimeType = 'text/plain'
    [string]$FileName = 'export.csv'

    @{
        data     = $Data 
        mimeType = $MimeType 
        fileName = $FileName
    }
}

the download starts but will produce this file:
grafik

I am a bit lost here.
My goal is that the DataGrid export will work like the server side export from UDTable.
The OnExport component in UDTable also contained the full filter / query and that is very helpful when working with large datasets and downloads.

Thanks for your help

Product: PowerShell Universal
Version: 3.6.2

The implementation of this is incorrect and will be resolved in 3.6.3. It should be returning the query options and not the rows because it will never be returning the full set of data.

The documentation will be updated to reflect this as well. It will work like UDTable.

Good news, thanks @adam