summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--autocomplete.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/autocomplete.js b/autocomplete.js
index c336123..90629a2 100644
--- a/autocomplete.js
+++ b/autocomplete.js
@@ -96,7 +96,7 @@ class Autocomplete {
this.field.value = e.target.innerText;
if (this.options.onSelectItem)
this.options.onSelectItem({
- value: e.target.value,
+ value: e.target.dataset.value,
label: e.target.innerText,
});
this.dropdown.hide();