UX: How do you use pagination in triplat-query and triplat-ds?


I’m trying to use the pagination feature of triplat-query, but I can’t access the items in each page. I followed the code from the documentation and see the page number in my currentPage variable. Is there anything else I need in the triplat-ds in order to use it? The {{people}} is displaying all people in this case.

<triplat-ds id=”peopleDs” name=”people” data=”{{people}}”>

<triplat-query>

<triplat-query-page id=”peopleDsPage” size=”50″ current-page=”{{currentPage}}” total-pages=”[[totalPages]]”>
</triplat-query-page>

<triplat-query-filter name=”firstName” operator=”contains” value=”{{searchValue}}” ignore-if-blank>
</triplat-query-filter>

<triplat-query-sort name=”firstName”></triplat-query-sort>

</triplat-query>

</triplat-ds>

// go to the next page
this.$.peopleDsPage.next();

// go to the previous page
this.$.peopleDsPage.prev();

Continue reading →

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s