eclipse-esmf / esmf-sdk-js-schematics

Create UI components for Angular applications with Schematics based on Aspect Models.
https://eclipse-esmf.github.io/js-sdk-guide/index.html
Mozilla Public License 2.0
2 stars 2 forks source link

[BUG] Sort Options set incorrectly for Remote Data mode #96

Closed sha4be closed 3 months ago

sha4be commented 3 months ago

How: List of performed steps

  1. Generate a table with enabled Remote Mode
  2. Select default sorting option during the table generation
  3. Run the table and observe the table data request payload

What: Actual result vs expected result Expected Result: the default sort property is specified at the table request Actual Result: sortProperty key if specified as a property to sort data

Where: (e.g. component, version, url, your system info) The issue is at the src/ng-generate/components/shared/methods/remote-handling/requestData.ts.template file. the following line treats sortProperty as a key for SortOptions, but it should be evaluated to the property value queryOption.setSort(new Sort(<SortOptions>{sortProperty: sortDirection})); The correct line queryOption.setSort(new Sort(<SortOptions>{[sortProperty]: sortDirection})); Input (files/screenshots)

Output (files/screenshots)

Additional context (e.g. references)