Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Dec 4, 2019. It is now read-only.

Pass cell scope to header renderer function#274

Open
smoakey wants to merge 1 commit into
swimlane:master from
Schoolrunner:feature/pass_cell_scope_to_header_renderer
Open

Pass cell scope to header renderer function #274
smoakey wants to merge 1 commit into
swimlane:master from
Schoolrunner:feature/pass_cell_scope_to_header_renderer

Conversation

@smoakey

@smoakey smoakey commented Feb 28, 2017

Copy link
Copy Markdown

Currently one of the demos is showing that cellScope is passed to the headerRenderer function similar to the cellRenderer. After looking at the code it was only passing the element.

Passing scope allows user to set things on scope within the headerRenderer function which the template can use to render. Example:

columns: [
 {
 name: 'Test'
 headerRenderer: function(scope, elem) {
 scope.someObjectInCellScope = {
 value: 'Hi there'
 };
 return `<span>{{ someObjectInParentScope.value }} - {{ someObjectInCellScope.value }}</span>`
 }
 }
]

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

1 participant

AltStyle によって変換されたページ (->オリジナル) /