DataTable ScrollHeight with percentage values is not adding scrollbar
I'm submitting a ... (check one with "x")
[ x] bug report => Search github for a similar issue or PR before submitting
[ ] feature request => Please check if request is not on the roadmap already https://github.com/primefaces/primeng/wiki/Roadmap
[ ] support request => Please do not submit support request here, instead see http://forum.primefaces.org/viewforum.php?f=35
Plunkr Case (Bug Reports)
http://plnkr.co/edit/sFkSceQkzD3kuLjZSxaE?p=preview
Current behavior When setting values for scrollHeight as 100% its not adding scrollbar.
Expected behavior setting value of scrollHeight as 100% should add scrollbar at the dataTable body level.
Minimal reproduction of the problem with instructions
- Add dataTable with scrollable true
- Set scrollHeight & scrollWidth as 100%
What is the motivation / use case for changing the behavior? Having the scrollbar at the dataTable body ensures that header columns will remain static, thereby we can use feature frozen headers
Please tell us about your environment:
-
Angular version: 4.4.5
-
PrimeNG version: 4.2.2
-
Browser: Chrome , Firefox, EDGE
Can't replicate with;
<div style="height:500px;border:1px solid black">
<p-dataTable [value]="cars" scrollable="true" scrollHeight="100%">
<p-header>Vertical</p-header>
<p-column field="vin" header="Vin"></p-column>
<p-column field="year" header="Year"></p-column>
<p-column field="brand" header="Brand"></p-column>
<p-column field="color" header="Color"></p-column>
</p-dataTable>
</div>
Note that a percentage is relative to the parent.
@cagataycivici I changed my Plunkr exactly like you mentioned(adding a parent div with specific height), But I still dont get the Scrollbar at the dataTable body level, But it came at the page level.
Pls check Plunkr and suggest what I am doing wrong. With static value as some 200px, the scrollbar is coming at body level http://plnkr.co/edit/sFkSceQkzD3kuLjZSxaE?p=preview