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

feat(grid): expose column input for template context #9694

Merged
merged 12 commits into from
Jul 2, 2021

Conversation

dobromirts
Copy link
Contributor

@dobromirts dobromirts commented Jun 10, 2021

Closes #9020

Additional information (check all that apply):

  • Bug fix
  • New functionality
  • Documentation
  • Demos
  • CI/CD

Checklist:

  • All relevant tags have been applied to this PR
  • This PR includes unit tests covering all the new code (test guidelines)
  • This PR includes API docs for newly added methods/properties (api docs guidelines)
  • This PR includes feature/README.MD updates for the feature docs
  • This PR includes general feature table updates in the root README.MD
  • This PR includes CHANGELOG.MD updates for newly added functionality
  • This PR contains breaking changes
  • This PR includes ng update migrations for the breaking changes (migrations guidelines)
  • This PR includes behavioral changes and the feature specification has been updated with them

hanastasov
hanastasov previously approved these changes Jun 10, 2021
@zdrawku zdrawku added 💥 status: in-test PRs currently being tested and removed ❌ status: awaiting-test PRs awaiting manual verification labels Jun 24, 2021
@zdrawku zdrawku added ✅ status: verified Applies to PRs that have passed manual verification and removed 💥 status: in-test PRs currently being tested labels Jun 28, 2021
Comment on lines 932 to 933
public set templateContext(value: any){
this._contextObject = value;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. templateContext suggests that the use can overwrite the context object in the column templates making it a little dubious.
    Maybe additionalTemplateContext or something along these lines.

  2. I don't think you need to separate it between a setter and a getter. Just leave it as simple property on the class.

  3. It will be nice to access the additional context directly from the template binding:

<ng-template igxCell let-props="additionalContext">
...
</ng-template>

@hanastasov hanastasov self-requested a review June 30, 2021 09:01
@zdrawku zdrawku merged commit 7238f2b into master Jul 2, 2021
@zdrawku zdrawku deleted the dTsvetkov/feat-9020-master branch July 2, 2021 10:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
grid: general version: 12.1.x ✅ status: verified Applies to PRs that have passed manual verification
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Expose a column input for passing additional data/state in the template contexts of the column
4 participants