Hidden Lightning components and refresh event - Ideas - Salesforce Trailblazer Community

All Ideas

Idea Details

Post an Idea
30  Points
Idea has been posted. Give it an upvote or downvote.

Hidden Lightning components and refresh event

Lightning Experience

Lighting components continue to respond to the force:refreshView event even after the page that loaded them has been navigated away from. If these components load data during this event, it is counted against your 100-SOQL limit per page load.

We are getting a lot of SOQL query limit errors from components reloading data that will never be used.

I see 2 possible solutions. One of these should be done by the Salesforce side.

1. Destroy the component immediately when the record that loaded it is navigated away from instead of holding on to those components. I have seen that even if you navigate back to the same record, a new component is created anyway.

2. An event needs to be raised that the component can respond to that will tell them the user has navigated away from the record for which it was loaded. This would not be fired simply by moving to a new tab (e.g., back to details from another tab) since the user might click back on the tab holding the component and it would need to have reloaded its data in that case.

Merge Idea · Flag

  • Upvotes
  • Downvotes



from AppExchange


Help us to keep IdeaExchange clean by pointing out overlapping ideas. We'll investigate your suggestion and merge the ideas if it makes sense.



Thanks for your merge suggestion. We will review it shortly and merge the ideas if applicable.

Salesforce takes abuse situations very seriously. Examples of abuse include but are not limited to posting of offensive language or fraudulent statements. To help us process your request as quickly as possible, please fill out the form below describing the situation. For privacy and security reasons, the final outcome of an abuse case may not be revealed to the person who reported it.


Thank you for your feedback. We take abuse seriously and will investigate this issue and take appropriate action.