From 12f2b71122e626ac237b58af49192efae5f4cfdb Mon Sep 17 00:00:00 2001 From: tugcekucukoglu Date: Wed, 13 Nov 2024 09:10:01 +0300 Subject: [PATCH] Fixed #6773 - Provide showEmptyMessage for AutoComplete --- packages/primevue/src/autocomplete/AutoComplete.d.ts | 5 +++++ packages/primevue/src/autocomplete/AutoComplete.vue | 2 +- packages/primevue/src/autocomplete/BaseAutoComplete.vue | 4 ++++ 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/packages/primevue/src/autocomplete/AutoComplete.d.ts b/packages/primevue/src/autocomplete/AutoComplete.d.ts index 7f3e97bdf..7894c1531 100755 --- a/packages/primevue/src/autocomplete/AutoComplete.d.ts +++ b/packages/primevue/src/autocomplete/AutoComplete.d.ts @@ -513,6 +513,11 @@ export interface AutoCompleteProps { * @defaultValue No results found */ emptySearchMessage?: string | undefined; + /** + * When enabled, empty search message will be visible. + * @defaultValue true + */ + showEmptyMessage?: boolean | undefined; /** * Index of the element in tabbing order. */ diff --git a/packages/primevue/src/autocomplete/AutoComplete.vue b/packages/primevue/src/autocomplete/AutoComplete.vue index 28b05c7fd..8c62ab205 100755 --- a/packages/primevue/src/autocomplete/AutoComplete.vue +++ b/packages/primevue/src/autocomplete/AutoComplete.vue @@ -162,7 +162,7 @@ {{ getOptionLabel(option) }} -
  • +
  • {{ searchResultMessageText }}
  • diff --git a/packages/primevue/src/autocomplete/BaseAutoComplete.vue b/packages/primevue/src/autocomplete/BaseAutoComplete.vue index eb17c46f7..98a4b91e4 100644 --- a/packages/primevue/src/autocomplete/BaseAutoComplete.vue +++ b/packages/primevue/src/autocomplete/BaseAutoComplete.vue @@ -150,6 +150,10 @@ export default { type: String, default: null }, + showEmptyMessage: { + type: Boolean, + default: true + }, tabindex: { type: Number, default: 0