ABP Commercial 7.0.1 / Blazor Server / EF / Non tiered
We noticed that, if we extend a dependent module's entity with a new column (for example, adding an 'EmployeeId' property to the IdentityUser entity), the new property is listed in the gird, but it's sort does not work properly. It seems to sort for the first page of results, but the sort does not work across multiple page results.
Additionally, we noticed that Boolean columns in the dependent modules do not sort correctly either. For example, in the user listing, if we sort by 'Active' we would expect the inactive users to be listed first - instead the sort seems somewhat random.
5 Answer(s)
-
0
hi
I will check that.
-
0
hi
Can I reproduce this on your https://github.com/balessi75/FM.Test project?
-
0
Hi @maliming,
You can reproduce 3 sorting issues using the https://github.com/balessi75/FM.Test project.
- Extended properties (mapped to EF) on ABP entities do not sort properly. You can see this by trying to sort on the "Host" column in the tenant management page
- Boolean properties for ABP entities do not sort properly. You can see this by sorting on the "Active" column under the User Management page.
- User Management's calculated "Roles" column does not have sorting enabled. If we replace/override the user management page and make the column sortable, we receive the following exception...
No property or field 'RoleNames' exists in type 'IdentityUser' (at index 24)
UserManagementTableColumns .AddRange(new TableColumn[] { ... new TableColumn { Title = L["Roles"], Data = nameof(IdentityUserDto.RoleNames), ValueConverter = (data) => { var roleNames = (data as IdentityUserDto)?.RoleNames; return roleNames == null ? string.Empty : string.Join(", ", roleNames); }, Sortable = true } ...
Is sorting with paged result sets supported with this kind of calculated column?
-
0
ok, I will try to test it.
-
0
https://github.com/abpframework/abp/issues/15910