@ons/design-system 44.1.1 → 44.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -131,6 +131,7 @@
131
131
  "isEditable": params.isEditable,
132
132
  "ariaYouHaveSelected": params.ariaYouHaveSelected,
133
133
  "ariaMinChars": params.ariaMinChars,
134
+ "minChars": params.minChars,
134
135
  "ariaResultsLabel": params.ariaResultsLabel,
135
136
  "ariaOneResult": params.ariaOneResult,
136
137
  "ariaNResults": params.ariaNResults,
@@ -54,7 +54,6 @@ export default class AutosuggestAddress {
54
54
  suggestionFunction: this.suggestAddresses.bind(this),
55
55
  sanitisedQueryReplaceChars: this.addressReplaceChars,
56
56
  sanitisedQuerySplitNumsChars: this.sanitisedQuerySplitNumsChars,
57
- minChars: 3,
58
57
  suggestOnBoot: true,
59
58
  handleUpdate: true,
60
59
  });
@@ -6,6 +6,7 @@
6
6
  class="{% if not params.externalInitialiser %}ons-js-autosuggest {% endif %}{% if params.isEditable == false %}ons-js-address-not-editable{% endif %}{% if params.mandatory is defined and params.mandatory == true %} ons-js-address-mandatory{% endif %} {% if params.containerClasses is defined and params.containerClasses %} {{ params.containerClasses }}{% endif %} ons-autosuggest-input"
7
7
  data-instructions="{{ params.instructions }}"
8
8
  data-aria-you-have-selected="{{ params.ariaYouHaveSelected }}"
9
+ data-min-chars="{{ params.minChars }}"
9
10
  data-aria-min-chars="{{ params.ariaMinChars }}"
10
11
  data-aria-one-result="{{ params.ariaOneResult }}"
11
12
  data-aria-n-results="{{ params.ariaNResults }}"
@@ -52,6 +52,7 @@ export default class AutosuggestUI {
52
52
  // Settings
53
53
  this.autosuggestData = autosuggestData || context.getAttribute('data-autosuggest-data');
54
54
  this.ariaYouHaveSelected = ariaYouHaveSelected || context.getAttribute('data-aria-you-have-selected');
55
+ this.minChars = minChars || context.getAttribute('data-min-chars') || 3;
55
56
  this.ariaMinChars = ariaMinChars || context.getAttribute('data-aria-min-chars');
56
57
  this.ariaOneResult = ariaOneResult || context.getAttribute('data-aria-one-result');
57
58
  this.ariaNResults = ariaNResults || context.getAttribute('data-aria-n-results');
@@ -66,7 +67,6 @@ export default class AutosuggestUI {
66
67
  this.typeMore = typeMore || context.getAttribute('data-type-more');
67
68
  this.allowMultiple = context.getAttribute('data-allow-multiple') || false;
68
69
  this.listboxId = this.listbox.getAttribute('id');
69
- this.minChars = minChars || 3;
70
70
  this.resultLimit = resultLimit || 10;
71
71
  this.suggestOnBoot = suggestOnBoot;
72
72
  this.lang = lang || 'en';