Skip to content

Feature/transform results#19

Open
macrozone wants to merge 2 commits into
meteor-utilities:masterfrom
panter:feature/transformResults
Open

Feature/transform results#19
macrozone wants to merge 2 commits into
meteor-utilities:masterfrom
panter:feature/transformResults

Conversation

@macrozone

Copy link
Copy Markdown

This MR allows to specify a transformResult function. This will invoked for every document in the list (on the collection-cursor).

Background:

Currently, showing nested properties in the table seems to be broken in griddle. With this change, we are able to flat the entries and use the path to the property:


import flat from 'flat'; // https://www.npmjs.com/package/flat
//....

  <MeteorGriddle
        transformResult={flat}
        columns={['_id', 'emails.0.address', 'profile.firstname', 'profile.lastname']}
        publication={"users.admin.list"}
        collection={Meteor.users}
        matchingResultsCount={"users.admin.count"}
      />


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

Successfully merging this pull request may close these issues.

1 participant