Github user garrensmith commented on a diff in the pull request:
https://github.com/apache/couchdb-fauxton/pull/33#discussion_r16406650
--- Diff: app/addons/databases/views.js ---
@@ -90,6 +114,55 @@ function(app, Components, FauxtonAPI, Databases) {
});
}
},
+ afterRender: function() {
+ var that = this,
+ AllDBsArray = _.map(this.collection.toJSON(), function(item,
key){
+ return item.name;
+ });
+
+ this.dbSearchTypeahead = new Components.Typeahead({
+ el: "input.search-autocomplete",
+ source: AllDBsArray,
+ onUpdate: function (item) {
+ that.switchDatabase(null, item);
--- End diff --
could we do some magic here and use `_.bind` instead of `that`.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---