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

Access cell value in cellTemplate #417

Open
nigelsim opened this issue Jun 8, 2023 · 1 comment
Open

Access cell value in cellTemplate #417

nigelsim opened this issue Jun 8, 2023 · 1 comment

Comments

@nigelsim
Copy link

nigelsim commented Jun 8, 2023

Is your feature request related to a problem? Please describe.
I want to be able to easily access the cell value from the cellTemplate, rather than having to read it from the row variable. In my case, the column key is a nested object. I don't have access to the render pipe, so I can't easily extract it either.

Describe the solution you'd like
Just expose the value as extracted by the render pipe as a template variable. This is all I'd need 90% of the time, and will make the templates more reusable. e.g., in my case, I want a light (on/off) based on the boolean value of the column. The column may be enabled or chilld.enabled.

Describe alternatives you've considered
Currently I've just copied the render pipe to my own code base.

@ssuperczynski
Copy link
Owner

ssuperczynski commented Jun 12, 2024

Hello @nigelsim, currently, there are two options:

this.columns = [
      { key: 'address.number', title: 'Number' },
      { key: 'address.street', title: 'Street' },
    ];

Does this work for you, or do you need a different solution?

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