diff --git a/CHANGELOG.md b/CHANGELOG.md index a9558da..5dfedab 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,5 @@ +## 2.0.2 - 22 May 2020 +- Add `noResultInfo` for when there are no results matching the user's search ## 2.0.1 - 22 May 2020 - Add migration instructions diff --git a/docs/guide/reference.md b/docs/guide/reference.md index c27bd9c..a0863af 100644 --- a/docs/guide/reference.md +++ b/docs/guide/reference.md @@ -13,6 +13,7 @@ | inputClass | String | | Class to be added to the `input` tag for validation, etc. | maxMatches | Number | 10 | Maximum amount of list items to appear. | minMatchingChars | Number | 2 | Minimum matching characters in query before the typeahead list appears +| noResultsInfo | String | 'No results found.' | Text to show when no results are found for what the user typed. | prepend | String | | Text to be prepended to the `input-group` | serializer | Function | `input => input`| Function used to convert the entries in the data array into a text string. | | showAllResults | `Boolean` | false | Show all results even ones that highlighting doesn't match. This is useful when interacting with a API that returns results based on different values than what is displayed. Ex: user searches for "USA" and the service returns "United States of America". diff --git a/src/components/VueTypeAheadBootstrap.vue b/src/components/VueTypeAheadBootstrap.vue index 725d556..0c92418 100644 --- a/src/components/VueTypeAheadBootstrap.vue +++ b/src/components/VueTypeAheadBootstrap.vue @@ -105,6 +105,10 @@ export default { type: Boolean, default: false }, + noResultsInfo: { + type: String, + default: "No results found." + }, showOnFocus: { type: Boolean, default: false diff --git a/src/components/VueTypeaheadBootstrapList.vue b/src/components/VueTypeaheadBootstrapList.vue index 752679b..d2c84e6 100644 --- a/src/components/VueTypeaheadBootstrapList.vue +++ b/src/components/VueTypeaheadBootstrapList.vue @@ -1,6 +1,8 @@