Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OrderBy in LoadData still not working with 5.9.5 #1928

Closed
osre77 opened this issue Jan 28, 2025 · 1 comment
Closed

OrderBy in LoadData still not working with 5.9.5 #1928

osre77 opened this issue Jan 28, 2025 · 1 comment

Comments

@osre77
Copy link
Contributor

osre77 commented Jan 28, 2025

Describe the bug
I have a dataGrid with virtualization turned on and using LoadData.
When ever a sort query starts with np() or String(), IQueryable.OrderBy(string) throws an exceptin that the model type does not have the property np or String.

This started with 5.9.5 since you updated to the Linq.Dynmaic V1.6.0. 5.0.0 with the 1.6.0 preview did still work.

To Reproduce
Steps to reproduce the behavior:

  1. Get the latest comit from https://github.com/CodeYesterday/Lovi
  2. Start CodeYesterday.Lovi application
  3. Click "Open session"
  4. Select the directory LogData\SmallSession included in the repository
  5. An error notification is shown that the property np does not exist in LogItemModel.
  6. The generated OrderBy expression form the DataGrid is np(LogEvent.Timestamp) asc
  7. The same happens when a column of type string is used for sorting with the String() cast.

Expected behavior
Data should be ordered and displayed, no exception is thrown.

Desktop (please complete the following information):

  • OS: Windows 11
  • Blazor Maui Hybrid

Additional context
The np istn't even needed here, since the default sort column is never null, not sure why np is used there.

The np seems not to be a problem for filtering, only for sorting.
The DataGrid is here: https://github.com/CodeYesterday/Lovi/blob/379f77071b3009ce05d11d6fe2aa72071314a6f7/source/CodeYesterday.Lovi/Components/Pages/LogView.razor#L19
The sorting is applied here: https://github.com/CodeYesterday/Lovi/blob/379f77071b3009ce05d11d6fe2aa72071314a6f7/source/CodeYesterday.Lovi/Session/InMemorySessionDataStorage.cs#L330

@enchev
Copy link
Collaborator

enchev commented Jan 29, 2025

FIxed in d4113e6

@enchev enchev closed this as completed Jan 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants