Giter Site home page Giter Site logo

Comments (4)

mitar avatar mitar commented on June 18, 2024

I think something else is happening. See this test which seems to work.

from meteor-reactive-publish.

kerf007 avatar kerf007 commented on June 18, 2024

Thanks for your feedback!
After that I install meteor-publish-composite package and did the task like this:

Meteor.publishComposite('placeholders', function() {
  const self = this
  return {
    find() {
      return Meteor.users.find({ _id: this.userId })
    },
    children: [
      {
        find(user) {
          const transform = doc => {
           // some transform
            return doc
          }
          let cursor = Placeholders.find(someQuery)

          let handle = cursor.observe({
            added: doc => {
              self.added('placeholders', doc._id, transform(doc))
            },
            changed: (newDoc, oldDoc) => {
              self.changed('placeholders', oldDoc._id, transform(newDoc))
            },
            removed: oldDoc => {
              self.removed('placeholders', oldDoc._id)
            }
          })

          self.onStop(() => handle.stop())
          return cursor
        }
      }
    ]
  }
})

And I get the same problem - first added message and than changed with cleared field.
After that I removed meteor-reactive-publish and it's working now... But I can't figure out what was it. May be it some package incompatibility or something else..

from meteor-reactive-publish.

mitar avatar mitar commented on June 18, 2024

If you can provide a small working reproduction (with the least number of packages, just those really required for reproduction), then there is a chance to help here. Otherwise not really.

from meteor-reactive-publish.

kerf007 avatar kerf007 commented on June 18, 2024

I created test project: https://github.com/kerf007/meteor-publish-test
The issue is reproducing or I don't understand something..

from meteor-reactive-publish.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.