-
Notifications
You must be signed in to change notification settings - Fork 2
Pagination UI does not work. #142
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
Comments
@jho-md FYI, I have a PR pending review which resolves this issue. |
Any updates on this issue? After deeper investigation, it seems that on first load, the endpoint Here’s the payload of
However, the
When you start interacting with the UI - like pressing pagination or sorting - these settings are eventually applied. But by then, pagination is already rendered incorrectly, which causes it to behave badly. |
Hi @jho-md , @andrejd22 , This has been fixed with version Thanks, |
Hi @acoumb , Thank you for resolving the issue. The data is now loading correctly, with sorting applied and the page size set properly (the table view shows the correct number of items per page). However, paging is still broken on the initial load—it renders based on the default page size of 10 items per page, regardless of the configured value. It should be reopened |
@acoumb This is what the payload looks like: The page size is set to 20, but after refreshing the page 5–10 times, the pagination only renders correctly once. |
@acoumb Pagination still appears broken after upgrading. I have a collection of entities that takes up a little more than 1 page. However, the bottom of the screen shows that there are 3 pages. When I go to page 2, page 2 still includes items from page 1. And when I click on page 3 (which should not exist), it shows the same entities as page 2. After this, navigating back to page 2 or page 1 doesn't do anything. I need to refresh in order for pagination to work again. |
@acoumb When navigating through the repository tree, pagination usually works as expected. However, if I refresh the browser (Chrome using F5 or Ctrl+F5), pagination breaks until I either apply a filter or navigate to a different repository and then return to the original one. Hopefully, this helps you reproduce the issue more easily. |
@acoumb after deployment to the live environment, this issue remains persistent and continues to significantly impact usability. The previous comment referred only to testing done on a local machine. |
Hi @jho-md , @andrejd22 , I've released an RC version - Could you install this version and check again? Thanks, |
@acoumb Tested on the latest version, and pagination doesn't work. It lists all of the entities on the first page, yet still shows up as having multiple pages. When I click on page 2 or page 3, nothing happens, since all of the entities are listed in page 1. |
@jho-md would you be able to share a screenshot/video sample with me? |
@acoumb |
@acoumb I tested it again, and the issue still persists. The behavior is the same on my local machine: when navigating through the repository tree, pagination generally works as expected. However, if I refresh the browser (in Chrome, using F5 or Ctrl+F5), pagination stops working. It only starts working again after I either apply a filter or switch to a different repository and then return to the original one. |
@jho-md , @andrejd22 I've released |
@acoumb It seems to be working fine for me. Paging and data loading function correctly, whether I change the page, set any page size, or refresh the page. |
@jho-md if this works for you as well, I will prepare the release of the patch version. |
@acoumb I am still not getting proper functionality on the latest release candidate. I tried setting page size to 5, and am still seeing all of the results on the first page. Hitting any of the other page buttons does not do anything, since all of the results were already on page 1. |
@jho-md in your config screenshot, what is the method I've just now verified the below works correctly. I think this is what you're expecting - a tree folder with a child node displaying the collection? Pagination works as expected when registered this way. In this example, my public static SectionTreeConfigBuilder AddPersonCollection(this SectionTreeConfigBuilder builder)
=> builder
.AddFolder("test folder", "icon-folder", folderConfig => folderConfig
.AddCollection<PersonDto>(x => x.Id, "Person", "People", "A person folder", "icon-umb-users", "icon-umb-users", collectionConfig => collectionConfig
.ListView(listViewConfig =>
{
listViewConfig.AddField(p => p.JobTitle).SetHeading("Job Title");
listViewConfig.AddField(p => p.Email);
listViewConfig.SetPageSize(4);
}))); |
@nathanwoulfe You are correct that I am expecting a tree folder with a child node displaying the collection. internal static TreeFolderConfigBuilder AddAagiCollection<TEntityType>(
this TreeFolderConfigBuilder treeContainerConfigBuilder,
string icon,
Action<TreeCollectionConfigBuilder<TEntityType>> collectionConfigDelegate,
string? singleIcon = null)
where TEntityType : BaseEntity {
ArgumentNullException.ThrowIfNull(treeContainerConfigBuilder);
var localizationPrefix = typeof(TEntityType).Name.ToFirstCharacterLowerCase();
return treeContainerConfigBuilder.AddCollection<TEntityType>(
x => x.Id,
$"#{localizationPrefix}_singular",
$"#{localizationPrefix}_plural",
$"#{localizationPrefix}_description",
singleIcon ?? icon,
icon,
collectionConfiguration => {
collectionConfiguration.SetAagiCollectionDefaults($"{localizationPrefix}s");
collectionConfigDelegate.Invoke(collectionConfiguration);
});
} The tree folder calls the internal static SectionTreeConfigBuilder AddSupplyDirectoryTree(this SectionTreeConfigBuilder sectionTreeConfig) {
ArgumentNullException.ThrowIfNull(sectionTreeConfig);
return sectionTreeConfig.AddFolder("#clientDirectory_supplyDirectory", "icon-shipping-box", folderConfig => {
folderConfig.SetOrdinal(6)
.AddSupplyItemConfiguration()
.AddSupplyCategoryConfiguration();
});
} For reference, here is the internal static CollectionConfigBuilder<TBuilder, TChildEntityType> SetAagiCollectionDefaults<TBuilder, TChildEntityType>(
this CollectionConfigBuilder<TBuilder, TChildEntityType> collectionConfiguration,
string alias)
where TBuilder : CollectionConfigBuilder<TBuilder, TChildEntityType>
where TChildEntityType: BaseEntity {
collectionConfiguration.SetRepositoryType<EntityFrameworkRepository<TChildEntityType>>();
collectionConfiguration.SetAlias(alias);
collectionConfiguration.SetDeletedProperty(x => x.SoftDelete);
collectionConfiguration.SetDateCreatedProperty(x => x.CreatedDate);
collectionConfiguration.SetDateModifiedProperty(x => x.ModifiedDate);
return collectionConfiguration;
} From what I can see, my code should be doing the same as your code, just with more configurations. |
@jho-md have you tried registering a minimal test case? I will do the opposite - implement your extensions and try to replicate. Also interested in the response data from While we're inspecting requests/responses, the request to EDIT => configuration via extension methods works as expected in my testing. |
@nathanwoulfe Inspecting the requests/responses uncovered the issue which was a misconfiguration on our side. Fixed the issue and pagination works as expected now. Thank you and I apologize for the inconvenience! |
@jho-md that's fantastic to hear - I was fast running out of suggestions 🚀 |
@nathanwoulfe @acoumb you have closed this issue, but when will version 15.1.6 with full functionality be released? |
@andrejd22 |
Uh oh!
There was an error while loading. Please reload this page.
Describe the bug
When viewing a collection, the UI for pagination does not work. Going to the next page works, however going backwards does not. And when you navigate to another collection and back to the original collection, the pagination bar disappears completely.
Steps To Reproduce
Steps to reproduce the behavior:
Expected behavior
Pagination to work as expected.
Screenshots
Environment (please complete the following information):
This item has been added to our backlog AB#51290
The text was updated successfully, but these errors were encountered: