Search icon
Subscription
0
Cart icon
Close icon
You have no products in your basket yet
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Learning Salesforce Lightning Application Development

You're reading from  Learning Salesforce Lightning Application Development

Product type Book
Published in Jul 2018
Publisher Packt
ISBN-13 9781787124677
Pages 458 pages
Edition 1st Edition
Languages
Concepts
Author (1):
Mohit Shrivatsava Mohit Shrivatsava
Profile icon Mohit Shrivatsava

Table of Contents (22) Chapters

Title Page
PacktPub.com
Foreword
Contributors
Preface
1. Introduction to the Lightning Component Framework 2. Exploring Salesforce DX 3. Lightning Component Building Blocks 4. The Lightning JavaScript API 5. Events in the Lightning Component Framework 6. Lightning Data Service and Base Components 7. Using External JavaScript Libraries in Lightning Components 8. Debugging Lightning Components 9. Performance Tuning Your Lightning Component 10. Taking Lightning Components out of Salesforce Using Lightning Out 11. Lightning Flows 12. Making Components Available for Salesforce Mobile and Communities 13. Lightning Navigation and Lightning Console APIs 14. Unit Testing Lightning Components 15. Publishing Lightning Components on AppExchange 1. Other Books You May Enjoy Index

Modifying the DOM in the RENDERER JavaScript file of the component bundle


The Lightning component framework takes care of rendering and re-rendering the DOM element when the values change. However, if you want to modify the DOM or take control of the DOM modification, you can do so in the render file. The following screenshot illustrates how you can find the RENDERER file for the component or the Lightning application:

To customize, modify, and interact with DOM elements, you must follow the following template in the RENDERER JavaScript file:

({
  // Your RENDERER method overrides go here
  render : function(component, helper) {
        var ret = this.superRender();
        // do custom rendering here
        return ret;
  },

    rerender : function(cmp, helper){
      this.superRerender();
      // do custom rerendering here
  },

    afterRender: function (component, helper) {
      this.superAfterRender();
      // interact with the DOM here
  },

    unrender: function () {
      this...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at ₹800/month. Cancel anytime}