Percentage Height support for ScrollPanel
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
Stackblitz Case (Bug Reports) You can see the demo in stackblitz below https://stackblitz.com/edit/github-clx4tm
Current behavior If you provide height for p-scrollpanel as *px value, then it will be ok. But if you provide *% (percentage) value it's completely broken.
Expected behavior Percentage values for height of p-scrollpanel is not broking anything, but dynamicly resizing panel.
Minimal reproduction of the problem with instructions
<p-scrollPanel [style]="{width: '100%', height: '20%'}">
<div class="ui-helper-clearfix">
<span>*Long-Height-Content*</span>
</div>
</p-scrollPanel>
If you set height of p-scrollpanel in percentages, content of p-scrollpanel is not overflowing and -scrollpanel container has fixed minimal size of any value of height.
What is the motivation / use case for changing the behavior? Relative dynamicly resizing more flexible then providing static height values in pixels. Also that's why we can't use flex-container (primeflex) with dynamicly resizable p-scrollpanel.
-
Angular version: 8.0.2
-
PrimeNG version: 8.0.0
-
Browser: Checked only on Chrome 75.0.3770.100. Maybe this behavoir works on all browsers.
-
Language: Checked only on TypeScript 3.5.1
You can calculate the dynamic height by yourself and set the height value
Hi,
So sorry for the delayed response! Improvements have been made to many components recently, both in terms of performance and enhancement. Therefore, this improvement may have been developed in another issue ticket without realizing it. You can check this in the documentation. If there is no improvement on this, can you reopen the issue so we can include it in our roadmap? Please don't forget to add your feedback as a comment after reopening the issue. These will be taken into account by us and will contribute to the development of this feature. Thanks a lot for your understanding!
Best Regards,
The issue hasn't been resolved yet. The component does not work with percentage height.