Addepar / Addepar/ember-table

Custom sticky header/footer offsets

Open
#834 5 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
1.7k
Forks
351
Avg merge
1d 22h
Merged PRs (30d)
1

Description

In some layouts, there may be fixed page elements (e.g. a fixed nav bar) above or below the table, and when scrolling the table, the sticky column headers/footers are hidden beneath them, because it appears their sticky offset is hardcoded to 0:

https://github.com/Addepar/ember-table/blob/e4379ed3b3c35d66787fb17eb00b3a9cc22f0d61/addon/-private/sticky/table-sticky-polyfill.js#L80

I think it would be nice to expose additional arguments on the <EmberTable> component, such as headerStickyOffset, and footerStickyOffset, that are passed into setupTableStickyPolyfill() which allow specifying a number that is base pixel value to offset their sticky positioning by. (Additionally, if changing these values after-render could re-adjust the sticky setup, that would be ideal, though probably not critical.)

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in addon/-private/sticky/table-sticky-polyfill.js at the referenced hardcoded sticky offset and trace how setupTableStickyPolyfill() is called by the component. Expose headerStickyOffset and footerStickyOffset as component arguments and pass them into the sticky setup; done means fixed elements no longer obscure the sticky header or footer, with changed values reapplying if feasible.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.