primefaces / primeng

The Most Complete Angular UI Component Library
https://primeng.org
Other
10.62k stars 4.63k forks source link

Percentage Height support for ScrollPanel #7834

Closed picolino closed 2 years ago

picolino commented 5 years ago

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.

is-tongben commented 3 years ago

You can calculate the dynamic height by yourself and set the height value

mertsincan commented 2 years ago

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,

michelebenolli commented 1 year ago

The issue hasn't been resolved yet. The component does not work with percentage height.