Skip to content

Commit

Permalink
fix: No results message not showing (#5)
Browse files Browse the repository at this point in the history
* fix: No results message not showing

* fix: Render using react

* fix: Changed to a zero comparison
  • Loading branch information
andres-rubio-go authored Oct 5, 2023
1 parent 158fef4 commit dba5e34
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
2 changes: 1 addition & 1 deletion packed_bubble.js

Large diffs are not rendered by default.

18 changes: 11 additions & 7 deletions src/bubble_chart/bubble_chart_container.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,17 @@ looker.plugins.visualizations.add({
// Clear any errors from previous updates
this.clearErrors();

// Issue identified where viz would not change with table calc filters
// need to supply the container with something new if we fail early and
// don't make it to the inteded render function.
// https://looker.atlassian.net/browse/DX-5779
if (data.length === 0) {
this.addError({
title: "No Results",
});
return;
}

const dimensions = [].concat(
queryResponse.fields.dimensions,
queryResponse.fields.table_calculations.filter(
Expand Down Expand Up @@ -120,13 +131,6 @@ looker.plugins.visualizations.add({
});
return;
}
if (data.length === 0) {
this.addError({
title: "No Results",
});
done();
return;
}

// const secondDimension = dimensions[1]
const firstMeasure = measures[0];
Expand Down

0 comments on commit dba5e34

Please sign in to comment.