From 2afa7f61d3f1369412aa37ffd287f18208bc4683 Mon Sep 17 00:00:00 2001 From: Mahdi Dibaiee Date: Wed, 2 Nov 2016 18:33:51 +0330 Subject: [PATCH] fix(trie): node.value --- _posts/2015-07-24-autocomplete-trie.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/_posts/2015-07-24-autocomplete-trie.md b/_posts/2015-07-24-autocomplete-trie.md index 1ad91be..8e9b8ba 100644 --- a/_posts/2015-07-24-autocomplete-trie.md +++ b/_posts/2015-07-24-autocomplete-trie.md @@ -176,7 +176,7 @@ input.addEventListener('keyup', () => { for (let node of nodes) { // << Change const category = node.category ? `- ${node.category}` : ''; - results.innerHTML += `
  • ${node.name} ${category}
  • `; + results.innerHTML += `
  • ${node.value} ${category}
  • `; } }); {% endhighlight %} @@ -195,7 +195,7 @@ input.addEventListener('keydown', e => { if (!current.children.length) return; - input.value = current.children[0].name; + input.value = current.children[0].value; } }); {% endhighlight %}