Access pagination number of records picklist via javascript

edited June 25, 2020 in Questions
Hello folks!

I need to create my own custom pagination within a Skuid page. I was wondering if there were any javascript methods I could tap into to, for example, access or change the number of records picklist (see screenshot).

Another thing that would be useful is to know which page of the pagination the user is on.

image

Cheers!

Louis

Comments

  • edited May 22, 2018
    I figure I can use javascript to trigger a change to the above picklist and then just hide that picklist via css but I was wondering if there was an approach that was a little less hacky...
  • Pat VachonPat Vachon 💎💎💎
    edited June 25, 2020
    Looks as if registered lists have functions that look potentially useful. Haven't tested any of these.

    image

    image
  • edited June 25, 2020
    Thanks Pat, that's now gotten me quite far.

    So I can now create my own next/prev/go-to-page navigation using stuff like:
    MyModel.registeredLists[41].nextPage();  
    What I can't quite work our is how to set the number of records per page. There's this property:
    MyModel.registeredLists[41].currentPageSize
    which I can set but if I then call render after setting it doesn't apply the update. I'm really looking for the method where currentPageSize can be set.

    Another thing - I can access my particular component via the [41] in the above array of registeredLists - is that a safe way of accessing these properties or is there a better way of targeting the desired list?

    Cheers!

    Louis

  • Pat VachonPat Vachon 💎💎💎
    edited May 23, 2018
    Better way? No idea. You're farther along than my look into the arguments passed into a snippet. I look for properties that have functions provided and go from there. As you know not all functions are documented.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!