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

Rows 250 plus #27

Open
lildent opened this issue Aug 9, 2023 · 2 comments
Open

Rows 250 plus #27

lildent opened this issue Aug 9, 2023 · 2 comments

Comments

@lildent
Copy link

lildent commented Aug 9, 2023

This is an awesome PCF controller. I wonder how you would go forward to adapt it to handle more rows ie 2000+
ajax call to pull more lines in when it scrolls near to the bottom maybe ? or a load next button, which loads n amount ?

I havent looked into the code. but is this something the controller could be capable of. and if so what would you approach be ?

@lildent
Copy link
Author

lildent commented Aug 9, 2023

private async updateViewAsync(context: ComponentFramework.Context<IInputs>) {

      

      if (!context.parameters.entityDataSet.loading) {

          if (context.parameters.entityDataSet.paging != null && context.parameters.entityDataSet.paging.hasNextPage == true) {

              //set page size

              context.parameters.entityDataSet.paging.setPageSize(5000);

              //load next paging

              context.parameters.entityDataSet.paging.loadNextPage();
          }

        }

I believe something like this should be the fix added to the index.ts

@lildent
Copy link
Author

lildent commented Aug 10, 2023

Seems the above works fine, it will keep loading untill all the records are there in the dataset

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

1 participant