javascriptangularjspaginationsmart-table

2 smart tables on 1 page, pagination changes both tables


I have 2 smart-tables on 1 page, each with pagination inside tfoot. The actual st-pagination is as simple as:

  <st-pagination st-items-by-page="15" st-displayed-pages="6"></st-pagination>

The problem is that when I change page on one of them, both tables change page. Is there a way to essentially point each table to its own pagination so that changing page on one pagination would only change 1 table's page?


Solution

  • Turns out to be a silly mistake - I need to bind different collections in st-table. i.e.

    table 1:

    <table st-table="collection1" st-safe-src="srcTable">
    

    table 2:

    <table st-table="collection2" st-safe-src="srcTable">