Skip to content

Commit

Permalink
[Data Explorer][Discover] Fix total hits issue
Browse files Browse the repository at this point in the history
Issue Resolve
#5068

Signed-off-by: ananzh <ananzh@amazon.com>
  • Loading branch information
ananzh committed Sep 21, 2023
1 parent 9c192a3 commit 3cc2182
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
- Fix broken app when management is turned off ([#4891](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4891))
- Correct the generated path for downloading plugins by their names on Windows ([#4953](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4953))
- [BUG] Fix buildPointSeriesData unit test fails due to local timezone ([#4992](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4992))
- [BUG][Data Explorer][Discover] Fix total hits issue for no time based data ([#5087](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/5087))

### 🚞 Infrastructure

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ import { useDiscoverContext } from '../../view_components/context';
import { setInterval, useDispatch, useSelector } from '../../utils/state_management';

interface DiscoverChartProps {
bucketInterval: TimechartHeaderBucketInterval;
chartData: Chart;
bucketInterval?: TimechartHeaderBucketInterval;
chartData?: Chart;
config: IUiSettingsClient;
data: DataPublicPluginStart;
hits: number;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export const DiscoverChartContainer = ({ hits, bucketInterval, chartData }: Sear
indexPattern,
]);

if (!hits || !chartData || !bucketInterval) return null;
if (!hits) return null;

return (
<DiscoverChart
Expand Down

0 comments on commit 3cc2182

Please sign in to comment.