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

creating columns from more than one field #6

Open
willishq opened this issue Oct 15, 2018 · 1 comment
Open

creating columns from more than one field #6

willishq opened this issue Oct 15, 2018 · 1 comment
Labels
enhancement New feature or request
Projects

Comments

@willishq
Copy link
Collaborator

We should be able to create a column from more than one field:

$column = $grid->addColumn('name', 'Full Name');
$column->fromFields('first_name', 'last_name');`

This will also require the withFormat() method to change to allow unlimited fields to be passed through if they are available, for instance

$column->withFormat(function ($firstName, $lastName) {
    return "${lastName}, ${firstName}";
});
@willishq willishq added the enhancement New feature or request label Oct 15, 2018
@willishq
Copy link
Collaborator Author

If there are two from fields, and a format provided which only has one param, should we appy the format to each element?

@willishq willishq added this to To do in Query Grid via automation Oct 15, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Query Grid
  
To do
Development

No branches or pull requests

1 participant