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

Generate row meta for header rows #879

Merged
merged 5 commits into from
Mar 18, 2021

Conversation

ahmacleod
Copy link
Contributor

@ahmacleod ahmacleod commented Mar 15, 2021

Generates and passes rowMeta objects for header rows. These already exist for body and footer rows, but were missing for the header.

This allows the template to access the row index for header rows, e.g.:

<EmberTable as |t|>
  <t.head @columns={{this.columns}} as |h|>
    <h.row as |r|>
      <r.cell as |column columnMeta|>
        {{#if (eq r.rowMeta.index 0)}}
          <div class="first-row-only">...</div>
        {{/if}}
        {{column.name}}
      </r.cell>
    </h.row>
  </t.head>

  {{!-- ... --}}

</EmberTable>

Verified

This commit was signed with the committer’s verified signature.
thecsw Sandy
@ahmacleod ahmacleod marked this pull request as ready for review March 15, 2021 21:10

Verified

This commit was signed with the committer’s verified signature.
thecsw Sandy

Verified

This commit was signed with the committer’s verified signature.
thecsw Sandy
@ahmacleod ahmacleod force-pushed the alex.macleod.temp/row-meta-for-header-rows branch from c1950f7 to 1793170 Compare March 15, 2021 22:25
@ahmacleod ahmacleod marked this pull request as draft March 15, 2021 22:25

Verified

This commit was signed with the committer’s verified signature.
thecsw Sandy
@ahmacleod ahmacleod marked this pull request as ready for review March 16, 2021 22:03
@ahmacleod ahmacleod requested review from a team and jiayingxu March 16, 2021 22:07

Verified

This commit was signed with the committer’s verified signature.
thecsw Sandy
…ow-meta-for-header-rows
@ahmacleod ahmacleod merged commit 09c97aa into master Mar 18, 2021
@ahmacleod ahmacleod deleted the alex.macleod.temp/row-meta-for-header-rows branch March 18, 2021 22:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants