Apex Designer Documentation
What's New
Getting Started
Business Objects
User Interfaces
App Behaviors
Project Settings
Patterns and Best Practices
App Showcase
Frequently Asked Questions
Version 2.2.214 Released
Version 2.2.221 Released
Version 2.2.244 Released
Version 2.2.273 Released
Flex Layout Helper Classes
Manage PDFs
Version 2.2.281 Released
Version 2.2.287 Released

Scroll To An Element

How to scroll to a specific element on your page

Blank Profile Image
Written by Ashish Gupta
Updated a year ago
Less than a minute read

On a page with a lot of content, it may be useful to scroll the page to a specific element  based on a user action like clicking a button. Here is how to accomplish that in Apex Designer.

Add a local name attribute to the target element:

Component definition with a local name defined

Use the native scrollIntoView method on the target from the component triggering the action:

Button component definition using scroll into view on click

If you need to do this programmatically in a User Interface Method, you can do it like this:

//decide what to scroll to (hardcoded here)
let element = this.history.nativeElement();

//scroll to the element
Powered by Apex Designer
Terms of ServicePrivacy Policy
© 2017-2023 Apex Process Consultants