pcf-universal-gantt-chart icon indicating copy to clipboard operation
pcf-universal-gantt-chart copied to clipboard

Rows 250 plus

Open lildent opened this issue 1 year ago • 2 comments

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 avatar Aug 09 '23 13:08 lildent

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 avatar Aug 09 '23 14:08 lildent

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

lildent avatar Aug 10 '23 08:08 lildent