Skip to content

Commit

Permalink
Make dataNodeLogic never load for dashboard with cached results
Browse files Browse the repository at this point in the history
  • Loading branch information
webjunkie committed Apr 24, 2024
1 parent 239fdc3 commit a476b22
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions frontend/src/queries/nodes/DataNode/dataNodeLogic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,13 +116,13 @@ export const dataNodeLogic = kea<dataNodeLogicType>([
actions.clearResponse()
}
if (
!(props.cachedResults && props.key.includes('dashboard')) && // Don't load data on dashboard if cached results are available
!queryEqual(props.query, oldProps.query) &&
(!props.cachedResults ||
(isInsightQueryNode(props.query) && !props.cachedResults['result'] && !props.cachedResults['results']))
) {
actions.loadData()
}
if (props.cachedResults) {
} else if (props.cachedResults) {
// Use cached results if available, otherwise this logic will load the data again
actions.setResponse(props.cachedResults)
}
Expand Down

0 comments on commit a476b22

Please sign in to comment.