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

Added mechanism that allows to use function to generate field values #217

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

bennidi
Copy link

@bennidi bennidi commented Mar 7, 2013

In my project I needed to bind KoGrid to a more complex json structure. Specifically I needed to access arrays and do some other computation that was not possible using simple string based path expressions.

It's now possible to pass a function as field value generator, like this:

{field: {alias: "to", accessor: function(item) {return item.to[0].address}}, displayName: 'To'}

This also allows for different values to be displayed, based on arbitrary conditions.

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