diff --git a/CHANGELOG.md b/CHANGELOG.md
index 64ca3b02bf54..aed16fbe88f9 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -35,6 +35,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
- Fix missing border for header navigation control on right ([#5450](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/5450))
- [BUG] Fix filtering issue in data source selector ([5484](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/5484))
- [BUG][Data] Support for custom filters with heterogeneous data fields ([5577](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/5577))
+- [BUG][Data] Fix empty suggestion history when querying in search bar [#5349](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/5349)
### 🚞 Infrastructure
diff --git a/src/plugins/data/public/ui/typeahead/suggestion_component.test.tsx b/src/plugins/data/public/ui/typeahead/suggestion_component.test.tsx
index 9769e4a19346..f75007444f48 100644
--- a/src/plugins/data/public/ui/typeahead/suggestion_component.test.tsx
+++ b/src/plugins/data/public/ui/typeahead/suggestion_component.test.tsx
@@ -45,6 +45,14 @@ const mockSuggestion: QuerySuggestion = {
type: QuerySuggestionTypes.Value,
};
+const mockEmptySuggestion: QuerySuggestion = {
+ description: '',
+ end: 0,
+ start: 0,
+ text: '',
+ type: QuerySuggestionTypes.Value,
+};
+
describe('SuggestionComponent', () => {
it('Should display the suggestion and use the provided ariaId', () => {
const component = shallow(
@@ -135,4 +143,37 @@ describe('SuggestionComponent', () => {
component.simulate('mouseenter');
expect(mockHandler).toHaveBeenCalledTimes(1);
});
+
+ it('Should return null for empty suggestion text', () => {
+ const component = shallow(
+