Github user garrensmith commented on a diff in the pull request:

    https://github.com/apache/couchdb/pull/221#discussion_r13076985
  
    --- Diff: src/fauxton/app/addons/documents/views.js ---
    @@ -563,6 +564,69 @@ function(app, FauxtonAPI, Components, Documents, 
Databases, pouchdb,
           this.params = options.params || {};
           this.expandDocs = true;
           this.perPageDefault = this.docParams.limit || 20;
    +
    +      // some doclists don't have an option to delete
    +      if (!this.viewList) {
    +        this.bulkDeleteDocsCollection = options.bulkDeleteDocsCollection;
    +      }
    +    },
    +
    +    removeDocuments: function (ids) {
    +      _.each(ids, function (id) {
    +        this.removeDocument(id);
    +      }, this);
    +
    +      this.pagination.updatePerPage(parseInt(this.$('#select-per-page 
:selected').val(), 10));
    +      FauxtonAPI.triggerRouteEvent('perPageChange', 
this.pagination.documentsLeftToFetch());
    +    },
    +
    +    removeDocument: function (id) {
    +      if (!this.rows[id]) {
    +        return;
    +      }
    +      this.rows[id].$el.fadeOut(function () {
    +        $(this).remove();
    --- End diff --
    
    $(this).remove should be ok unless those backbone views are listening to 
events? Because using jquery to remove it from the dom instead of backbone, 
those views events, models etc wont get cleaned up.


---
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.
---

Reply via email to