Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Unanswered

Responsive containers and auto height / vertical overflow

Like (0) ShareShare
ReportReport
Posted on 27 Mar 2023 18:34:25 by 4

Hopefully I missed something otherwise I cannot understand how this is still not supported. 

 

I have this simple container as the right section of my layout. This is the container I want a vertical scrollbar on, not on any of the child containers, I want my scrollbar on this right vertical container.

1.jpg

 

Now in this vertical container, I have a child cards container which displays fixed size cards with wrap enabled and flexible height enabled. 

2.jpg

 

The problem is, with flexible height enabled, the cards container will take the available height but not more, which means if I have more than 4 cards, the cards container will be considered overflowing, but NOT the parent on which I want the scrollbar. Coming from HTML/CSS, I would expect :

  • The Vertical Overflow property to have a "Show" value available just like CSS, that way the shown overflow could be transferred back to the parent container which could detect overflow and show a scrollbar if desired
  • Some kind of auto height property on the cards container which could also enable the parent right container to detect overflow and show a scrollbar if desired

Right now, the only work arounds I see are:

  • Setting the Vertical Overflow property of the cards container to Scroll, but this will put a scroll on the cards container which makes no sense in terms of user experience
  • Disabling flexible height on the cards container and setting an explicit height instead, but I have to use complex formulas to calculate the height the container should have based on the amount of cards and their individual height.

 

What is the point of having "responsive" containers that can "wrap" items, if it can't have a dynamic height or transfer it's vertical overflow to it's parent? Except having scrollbars on every containers this doesn't make sens, I should be able to either have a container with auto-height OR a the option the "show" the overflow instead of hide or scroll...

 

Below is the result I am looking for, I managed to this by forcing an explicit height to the cards container, using complex formulas to calculate the required height based on the amount of cards and the available width etc...But I have a hard time imagining there isn't a simple way to do this!

3.jpg

  • LuizVicente Profile Picture
    984 Super User 2024 Season 1 on 07 May 2024 at 18:19:40
    Re: Responsive containers and auto height / vertical overflow

    Guys, as far as I know, nothing has been done to have a container with auto height.
    But think of it this way:

     

    - a container with auto height will look like pages with infinite scroll. From a UI/UX point of view this is not good for the user.

     

    In my opinion, the best way to do this (so far) is to use a gallery. If this is not the case, the main container must have the vertical overflow property as 'scroll', and the child containers must have a height greater than the parent.

     

    For the application to be 'really' responsive, it should not have options for x, y, width and height. It should be automatic, like flex and css grid. IMO.

  • dleopard Profile Picture
    2 on 07 May 2024 at 18:06:21
    Re: Responsive containers and auto height / vertical overflow

    I'm guessing there is still no support for this, other than writing your own formulas?

  • RoyBatty Profile Picture
    on 12 Oct 2023 at 01:09:01
    Re: Responsive containers and auto height / vertical overflow

    Has this been resolved yet?  Like the parent, I'm incredulous that something like this hasn't been put in Power App yet?  

     

    Please give us a solution to this  that doesn't involve a bunch of manual sizing.

  • sp.plante Profile Picture
    40 on 28 Mar 2023 at 18:20:26
    Re: Responsive containers and auto height / vertical overflow

    Hi there, 

     

    No, on your image the scroll appears on the cards container, this is specifically what I don't want. In terms of UI experience, having the scrollbar on each individual child containers is such a pain, just imagine having the scroll down with your fingers to see content under the cards, you will have a scroll on the page or main container, and a scroll on the cards container...

     

    What I want is a single scroll on the main container, and for this the cards container has to have a height equivalent to "auto" in CSS, so the overflow gets tranferred to the main container which can in turn show the scrollbar. But "auto height" does not exist in PowerApps!! What could work would be to set the Vertical Overflow to "Show" on the cards container, but that doesn't exist either!

     

    This is the exact result I am looking for, but for this I have to use a complex formula to explicitly set the cards container height:
    1.gif

    I just don't understand how PowerApps can pretend to be responsive and mobile friendly when it doesn't support something as dumb as a container with auto height. If you want a container with auto height, you literally have to set the height dynamically based on the height of all it's children, it makes absolutely no sens...

    Edit: Just realized I used a different account by mistake to post this, but this is OP 😁

  • LuizVicente Profile Picture
    984 Super User 2024 Season 1 on 28 Mar 2023 at 17:27:42
    Re: Responsive containers and auto height / vertical overflow

    I have the same problem sometimes. 😝
    Are these cards inside a gallery?

     

    Edit:

    I tried to do something similar inside a gallery, and the scroll bar appears normally.

     

    scroll cards.gif

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,771 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,091 Most Valuable Professional

Leaderboard
Loading started