Auth0 Angular 10
Apex Designer Documentation
What's New
Getting Started
Projects
Business Objects
Processes
User Interfaces
App Behaviors
Files
Dependencies
Project Settings
Libraries
Patterns and Best Practices
App Showcase
Angular 10 Base Library
Frequently Asked Questions

Scroll To An Element

How to scroll to a specific element on your page

Blank Profile Image
Written by Ashish Gupta
Updated 2 years 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
element.scrollIntoView();
Powered by Apex Designer
Terms of ServicePrivacy Policy
© 2017-2024 Apex Process Consultants