From b03f20e982c4c8905726bb261161cb7a283f0815 Mon Sep 17 00:00:00 2001 From: Ansis Brammanis Date: Sat, 23 Feb 2013 18:51:37 -0500 Subject: [PATCH] Use combobox for key field --- js/id/ui/taglist.js | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/js/id/ui/taglist.js b/js/id/ui/taglist.js index dd9a41091..9adcab563 100644 --- a/js/id/ui/taglist.js +++ b/js/id/ui/taglist.js @@ -194,7 +194,7 @@ iD.ui.Taglist = function() { var entity = list.datum(), geometry = entity.geometry(context.graph()), row = d3.select(this), - key = row.selectAll('.key'), + key = row.selectAll('.key-wrap'), value = row.selectAll('.input-wrap-position'); function sort(value, data) { @@ -210,13 +210,14 @@ iD.ui.Taglist = function() { return sameletter.concat(other); } - key.call(d3.typeahead() - .data(_.debounce(function(_, callback) { + var keyinput = key.select('input'); + key.call(d3.combobox() + .fetcher(_.debounce(function(_, __, callback) { taginfo.keys({ geometry: geometry, - query: key.property('value') + query: keyinput.property('value') }, function(err, data) { - if (!err) callback(sort(key.property('value'), data)); + if (!err) callback(sort(keyinput.property('value'), data)); }); }, 500))); @@ -224,7 +225,7 @@ iD.ui.Taglist = function() { value.call(d3.combobox() .fetcher(_.debounce(function(_, __, callback) { taginfo.values({ - key: key.property('value'), + key: keyinput.property('value'), geometry: geometry, query: valueinput.property('value') }, function(err, data) {