Skip to content

Broken server side subscription on Meteor 2.0 #154

@aessig

Description

@aessig

What

The client collection gets fed with results and the results accumulate. So we have 5 entries (for example) at the first letter input, then when the second letter is typed in, we have 10 entries in the client collection. The client-side of the code displays everything it has in the collection, therefore the autocomplete doesn't work. It looks like the _publishCursor doesn't purge the collection every time it's updated.

Reproduction

  • Run Meteor 2.0 with meteor-autocomplete (last commit of master branch) and server-side subscription.

Here is what the code looks like on the server:

Meteor.publish("autocompleteMyCollection", function(selector, options) {
  Autocomplete.publishCursor(MyCollection.find(selector, options), this);
  this.ready();
});

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions