{"action":"closed","issue":{"url":"https://api.github.com/repos/sergeyt/meteor-typeahead/issues/80","repository_url":"https://api.github.com/repos/sergeyt/meteor-typeahead","labels_url":"https://api.github.com/repos/sergeyt/meteor-typeahead/issues/80/labels{/name}","comments_url":"https://api.github.com/repos/sergeyt/meteor-typeahead/issues/80/comments","events_url":"https://api.github.com/repos/sergeyt/meteor-typeahead/issues/80/events","html_url":"https://github.com/sergeyt/meteor-typeahead/issues/80","id":78227193,"number":80,"title":"Selected dataset undefined for multi-dataset","user":{"login":"zaklampert","id":7213046,"avatar_url":"https://avatars.githubusercontent.com/u/7213046?v=3","gravatar_id":"","url":"https://api.github.com/users/zaklampert","html_url":"https://github.com/zaklampert","followers_url":"https://api.github.com/users/zaklampert/followers","following_url":"https://api.github.com/users/zaklampert/following{/other_user}","gists_url":"https://api.github.com/users/zaklampert/gists{/gist_id}","starred_url":"https://api.github.com/users/zaklampert/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zaklampert/subscriptions","organizations_url":"https://api.github.com/users/zaklampert/orgs","repos_url":"https://api.github.com/users/zaklampert/repos","events_url":"https://api.github.com/users/zaklampert/events{/privacy}","received_events_url":"https://api.github.com/users/zaklampert/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-05-19T19:47:41Z","updated_at":"2016-04-04T14:54:43Z","closed_at":"2016-04-04T14:54:43Z","body":"search.html\r\n```\r\n<input id=\"recipeFilter\" \r\n\t\t\t \tclass=\"form-control typeahead\" \r\n\t\t\t \tname=\"suggestions\" \r\n\t\t\t \ttype=\"text\" \r\n\t\t\t \tdata-sets=\"categories\"\r\n\t\t\t \tdata-template=\"suggestions\" \r\n\t\t\t \tdata-value-key=\"name\"\r\n\t\t\t \tdata-selected=\"selected\"\r\n\t\t\t \tplaceholder=\"Search Recipes...\"/>\r\n```\r\n\r\nsearch.js\r\n```\r\nTemplate.search.helpers({\r\n\tcategories:function(){\r\n\t\treturn[\r\n\t\t\t{\r\n\t\t\t\tname: 'products',\r\n\t\t\t\tvalueKey: 'name',\r\n\t\t\t\tdisplayKey: 'name',\r\n\t\t\t\tlocal: function(){return Products.find().fetch();},\r\n\t\t\t\theader: '<h2>Recipes by Product</h2>',\r\n\t\t\t\ttemplate: 'productSuggestions'\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\tname: 'recipe_groups',\r\n\t\t\t\tvalueKey: 'name',\r\n\t\t\t\tdisplayKey: 'name',\r\n\t\t\t\tlocal: function(){return RecipeGroups.find().fetch();},\r\n\t\t\t\theader: '<h2>Recipes by Group</h2>'\r\n\t\t\t}\r\n\t\t]\r\n\t},\r\n\tselected:function(e, suggestion, dataset){\r\n\t\t//console.log(suggestion);\r\n\t\tconsole.log('dataset: '+dataset)\r\n\t}\r\n})\r\n```\r\n\r\nSelecting an item logs \"undefined\" for dataset. \"Suggestion\" returns as...suggested. \r\n\r\n"}}