• KyleJ Gorges
  • NEWBIE
  • 0 Points
  • Member since 2016

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 0
    Replies
We are attempting to build a lightning component for our salesforce community.  We are using the Napili template.  We want to use jQuery datatables in the lightning component (to allow for sorting, paging, and searching).  The lightning component is placed on a page referenced by a tab on the standard template nav bar.  When we first load the page, everything looks good, the datatable operates correctly.  When we click on another nav link (or even the same nav link again), the datatable loses its data (it isn't apparent at first, but when you click on a column to sort the table, the data disappears - a "No data" message is in the table).  Our datatable call is done in afterRender.  If we refresh the browser, everything works fine again.  Just navigating away from the tab and then back within the community do we see this problem.  

The data is populated in our apex controller via a doInit function in the component controller.  We know the data is getting populated properly because if we don't make the datatable call, we see the data in a normal table.

Has anybody seen this or have any suggestions?