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

Setting page size on initialization does not work #51

Open
jadrake75 opened this issue Aug 15, 2015 · 1 comment
Open

Setting page size on initialization does not work #51

jadrake75 opened this issue Aug 15, 2015 · 1 comment

Comments

@jadrake75
Copy link

If you set page-size="20000" it will still use 10. Unless you debounce a call to a bound variable in your view-model on attached(). example

export class MyTableVM {
         pageSize = 50;

         attached( ) {
              _.debounce(function(self) {
                 self.pageSize = self.pageSize * 1000;
              })(this);
          }
}

The subsequent html looks like

<grid page-size.bind="pageSize">
...
</grid>

in grid.js the page size is being read as 10 and only changes if your change that value after the fact (so your demos work but it not configurable in template)

@charlespockert
Copy link
Owner

Aware of this - I changed a few things because I was getting two data loads on init - I think I'm using the wrong hook for initialisation, so as a temporary measure I took out the page size change refreshing the grid which causes this issue

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

2 participants