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

extraData for ExpandRowColumn should allow for a closure so we can pass model information #883

Closed
5 of 6 tasks
adamwinn opened this issue Mar 13, 2019 · 0 comments
Closed
5 of 6 tasks

Comments

@adamwinn
Copy link

Prerequisites

  • I have searched for similar issues in both open and closed tickets and cannot find a duplicate.
  • The issue still exists against the latest master branch of yii2-grid.
  • This is not an usage question. I confirm having gone through and read the documentation and demos.
  • This is not a general programming / coding question. (Those should be directed to the webtips Q & A forum).
  • I have attempted to find the simplest possible steps to reproduce the issue.
  • I have included a failing test as a pull request (Optional).

Steps to reproduce the issue

extraData only allows for a simple array, but it would be nice to be able to access model information with it.

Something like this:

$col['extraData'] = function ($model, $key, $index, $column) {
            return [
                    'event_id' => $model['event_id']
            ];
        };
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