From 92203da895cab7e944191b6b09f29dbce6f9d606 Mon Sep 17 00:00:00 2001 From: Gilson Doi Junior Date: Fri, 1 Nov 2019 15:05:18 -0300 Subject: [PATCH 1/2] added diacritcs attribute to made input diacritics insensitive --- README.md | 1 + src/components/VueBootstrapTypeahead.vue | 5 +++++ src/components/VueBootstrapTypeaheadList.vue | 14 ++++++++++++-- 3 files changed, 18 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index cb3e139..4a24c7a 100644 --- a/README.md +++ b/README.md @@ -110,6 +110,7 @@ export default { Name | Type | Default | Description --- | --- | --- | --- data | `Array` | | Array of data to be available for querying. **Required** +diacritcs | `Boolean` | | If is set true the input is diacritics insensitive (the listing is still diacritcs sensitive) serializer | `Function` | `input => input` | Function used to convert the entries in the `data` array into a text string. size | `String` | | Size of the `input-group`. Valid values: `sm` or `lg` backgroundVariant | `String` | | Background color for the autocomplete result `list-group` items. [See valid values](http://getbootstrap.com/docs/4.1/utilities/colors/#background-color) diff --git a/src/components/VueBootstrapTypeahead.vue b/src/components/VueBootstrapTypeahead.vue index e172442..ebbc28a 100644 --- a/src/components/VueBootstrapTypeahead.vue +++ b/src/components/VueBootstrapTypeahead.vue @@ -34,6 +34,7 @@ :text-variant="textVariant" :maxMatches="maxMatches" :minMatchingChars="minMatchingChars" + :removeDiacritcs="removeDiacritcs" @hit="handleHit" > @@ -92,6 +93,10 @@ export default { type: Number, default: 2 }, + removeDiacritcs: { + type: Boolean, + default: false, + }, placeholder: String, prepend: String, append: String diff --git a/src/components/VueBootstrapTypeaheadList.vue b/src/components/VueBootstrapTypeaheadList.vue index f404987..6e406de 100644 --- a/src/components/VueBootstrapTypeaheadList.vue +++ b/src/components/VueBootstrapTypeaheadList.vue @@ -18,6 +18,10 @@