4 Answers, 1 is accepted
Hello,
By setting popupSettings.height to 'auto', the browser will calculate it for you. Here is an example - https://stackblitz.com/edit/react-xa5jqs?file=app/main.jsx.
Regards,
Nikolay
Progress Telerik
Five days of Blazor, Angular, React, and Xamarin experts live-coding on twitch.tv/CodeItLive, special prizes, and more, for FREE?! Register now for DevReach 2.0(20).
Still isn't what I'm looking for - I need something like maxHeight
I'm trying to build filtering and when It contains many elements,- It should show scroll, otherwise should work like height auto.
Maybe smth like this
popupSettings.height = items.length > 5 ? '100' : 'auto' ?
Would It work properly
Hello, Sergey,
Thank you for the clarification.
The height property actually sets max-height CSS rules instead of height:
This means, that setting it will show scrolling when there are many items and automatically remove it when there are less items.
Regards,
Stefan
Progress Telerik
Five days of Blazor, Angular, React, and Xamarin experts live-coding on twitch.tv/CodeItLive, special prizes, and more, for FREE?! Register now for DevReach 2.0(20).