primefaces / primefaces/primereact
TreeTable: scrollHeight="flex"
Nobody has claimed this yet.
- Dominant language
- CSS
- Stars
- 8.3k
- Forks
- 1.2k
- PR merge metrics
- No merged PRs in 30d
Description
Describe the feature you would like to see added
Currently TreeTable does not support scrollHeight="flex" as DataTable does.
Is your feature request related to a problem?
When scrollHeight="100%" is used, .p-treetable-scrollable-body max-height is computed dynamically during the render, which causes problems, when you need to change TreeTable height without re-render (e.g. by putting it in a vertical splitter or adding other items in a flex column). DataTables don't have this problem when scrollHeight="flex" is used.
Since the height of the TreeTable is determined by the max-height property, it doesn't fill the available space of the parent container when there are just a few rows in the table and when a horizontal scroll is needed, the scrollbar appears right below the last row instead of the bottom of the parent container.
Reproducer
https://codesandbox.io/p/sandbox/primereact-demo-forked-zprg8k
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked CodeSandbox reproducer and compare TreeTable's scroll behavior with DataTable's existing scrollHeight="flex" support. Trace how .p-treetable-scrollable-body handles height and max-height, then verify that resizing the parent or changing sibling content updates the table height and keeps a horizontal scrollbar at the container bottom.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- css, react
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100