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

Get the count of elements after render #297

Open
zurmoehle opened this issue Jan 2, 2018 · 0 comments
Open

Get the count of elements after render #297

zurmoehle opened this issue Jan 2, 2018 · 0 comments

Comments

@zurmoehle
Copy link

zurmoehle commented Jan 2, 2018

Hello,
is there a way to get the count of elements after the table is rendered?

I have a filter installed. This will change the number of displayed items. Since I have a load more built in, I need a function that hides the button if not enough elements are available.

 var dynatable = $('#proflist').dynatable({
      features: {
        paginate: true,
        sort: true,
        pushState: true,
        search: true,
        recordCount: false,
        perPageSelect: true
      },
      inputs: {
        queryEvent: 'blur change keyup'
      }
}).data('dynatable');

This is the load more Button.

$(".loadmore").click(function () {
      perPage = addPerPage + perPage;
      dynatable.paginationPerPage.set(perPage);
      dynatable.process();
      if(perPage > count){
        $(this).addClass("disable");
      }
});
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