Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Published data, brought in by MeteorGriddle (rowData) does not have helpers (transform) applied #12

Open
zeroasterisk opened this issue May 10, 2016 · 2 comments

Comments

@zeroasterisk
Copy link

zeroasterisk commented May 10, 2016

ref:
dburles/meteor-collection-helpers#60

It appears that my found documents from MeteorGriddle do not have their helpers.

I can work around this by manually applying inside a React component Campaigns._transform(this.props.rowData)... but i shouldn't have to.

I also tried to set it up manually within the publish as a custom transform options.transform = (doc) => Campaigns._transform(doc);...
but it still didn't have the helpers by the time it got to rowData.

Is this a problem with MeteorGriddle somehow (seems unlikely), or with Collection Helpers (also seems unlikely), or my implementation (likely, but unsure how to debug)?

I do have helpers whenever I manually find() a document, in the console.

@SachaG
Copy link
Contributor

SachaG commented May 11, 2016

I guess MeteorGriddle could call Collection._transform(doc) for you automatically? I'm not sure if that makes sense though.

@SachaG
Copy link
Contributor

SachaG commented May 11, 2016

And by the way that's the expected behavior since we're calling fetch(), thus transforming the MongoDB cursor into a "dumb" array.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants