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

PageSizes wrong parameters #150

Closed
audrys opened this issue Apr 1, 2019 · 9 comments
Closed

PageSizes wrong parameters #150

audrys opened this issue Apr 1, 2019 · 9 comments
Labels

Comments

@audrys
Copy link

audrys commented Apr 1, 2019

Hi,
I would like to set own page sizes for the grid.
In gridOptions I added parameters:

pagination: {
        pageSizes: [50, 100, 500],
        pageSize: 100,
        totalItems: 0
      }

In result I have got my sizes on the top of default (25,30,40,50,75,100).
Thanks for the help

@ghiscoding
Copy link
Owner

Pagination is only used with the backendServiceApi, are you using it? If so that is the correct way of changing the options.

@audrys
Copy link
Author

audrys commented Apr 1, 2019

Hi,
Thanks for answer.
Yes, I am using bacckendServerApi:

backendServiceApi: {
        service: new GridOdataService(),
        preProcess: () => this.dataLoaded.emit(false),
        process: (query) => this.getCustomerApiCall(query),
        postProcess: (response) => {
          this.dataLoaded.emit(true);
          this.getCustomerCallback(response);
        }
      }

BR

@ghiscoding
Copy link
Owner

I could check later with OData, it should work.

Just wondering, are you using Angular and Aurelia at the same time?
I see you creating issues in both of my libs, are you really using both frameworks?

@audrys
Copy link
Author

audrys commented Apr 1, 2019 via email

@ghiscoding
Copy link
Owner

Well this ticket here is for Aurelia-Slickgrid, if you are using only the Angular-Slickgrid, then you should not log this issue here but instead in Angular-Slickgrid repo. I maintain both repos (Angular & Aurelia) but the issue should match the correct framework.

To come back to your issue, changing the pagination pageSizes works for me with Angular-Slickgrid. On my side, I have that saved into a global variable which I then pass to the AngularSlickgridModule.forRoot(globalGridConfig) in the App Module.

@ghiscoding
Copy link
Owner

Wait I see what you mean, I updated the OData example and I do see the problem. It seems that it keeps the old sizes and adds the new sizes on top of the old one. I'll look into a fix

image

@audrys
Copy link
Author

audrys commented Apr 1, 2019 via email

@ghiscoding
Copy link
Owner

I have pushed a commit in Angular-Slickgrid repo to address the original issue. I will wait a few more days to release a new version though.

@ghiscoding
Copy link
Owner

@audrys
The fix was pushed and released in the Angular-Slickgrid repo last week, you can update your version to 2.4.6.

Also please make sure to open issue in respective repo, I maintain both Angular & Aurelia repos but the code base is slightly different in each (about 10-15% is different).

Thanks for the feedback

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants