Skip to content

Get the count of elements after render #297

Open
@zurmoehle

Description

@zurmoehle

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");
      }
});

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions