This is a question and an idea. I have need for a reverse scrolling feature in the deck component in unified builder. Picture the text messaging apps that anchor the most recent record at the bottom and you scroll up instead of down. Has anyone done this? Also, I would like to include it as an idea for development, though there are probably limited use cases, so I doubt it will make the priority list. You may find more people (like me) making more mobile friendly apps that may utilize this function more now that there is the Scale to mobile option which I really love.
Hi Raymond, I was imagining using the sort option for the Deck’s model, but perhaps you’ve got something more nuanced in mind than sorting your records in ascending or descending order. Sorting on the model-level needs to use a real field, because it’s actually part of the SOQL query sent to Salesforce, so we can’t use {{index}} which is the way to refer to a row’s number with merge-syntax.
Here is an inline Javascript method for scrolling your page to the bottom on page-load. If you add this to your page (not as a snippet, but as an inline resource), it should scroll to the X and Y coordinates you specify in the parentheses. The number 10000 is arbitrary, so if your page is longer you may need to make this number larger.
<br>(function(skuid){<br> var $ = skuid.$;<br> $(".nx-page").one("pageload", function(){<br> window.scrollTo(0, 10000);<br> });<br>})(skuid);
Interesting… I’ll give it a try and report back! Thanks, Mark!
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.