# Perspective Flex Repeater auto-fit contents - how?

**URL:** <https://forum.inductiveautomation.com/t/perspective-flex-repeater-auto-fit-contents-how/43106>\
**Category:** Ignition\
**Created:** [February 7, 2021, 2:22pm UTC](https://forum.inductiveautomation.com/t/perspective-flex-repeater-auto-fit-contents-how/43106 "2021-02-07T14:22:52Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [February 7, 2021, 2:22pm UTC](https://forum.inductiveautomation.com/t/perspective-flex-repeater-auto-fit-contents-how/43106/1 "2021-02-07T14:22:52Z")

</div>

Ignition 8.1.1.

I’m using the Flex Repeater to generate multiple instances of my dropdown view (a caption and a dropdown). How do I get it to autosize to “just” fit the contents. In my case I want the height to adjust and the table to be up against the Flex Repeater (with, of course, a little padding for elegance).

 ![Perspective Flex Repeater gap](https://us1.discourse-cdn.com/inductiveautomation/original/3X/0/7/070e7c0de00fe199f45148b88b97f511fa6891f9.png)  
_Figure 1. The problem gap with “wide” browser._

 ![Perspective Flex Repeater scroll bar](https://us1.discourse-cdn.com/inductiveautomation/original/3X/b/2/b21f8ff17aba6e86f212c2444d9842c53e924f3e.png)  
_Figure 2. The problem scrollbar with “narrow” browser._

Is what I want possible? I’ve had a look at _Flexbox_ Q&A on Stack Exchange and can find references to `flex-basis: auto` but don’t know how to add a CSS override into Perspective.

Any ideas? It seems like a fairly basic functional requirement.

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [February 7, 2021, 2:30pm UTC](https://forum.inductiveautomation.com/t/perspective-flex-repeater-auto-fit-contents-how/43106/2 "2021-02-07T14:30:23Z")

</div>

Is your flex repeater within a flex container? If so, is the flex repeater’s position.basis set to auto?  
Try also setting the default height prop to true (can’t remember exact name) in the flex repeater

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [February 7, 2021, 4:02pm UTC](https://forum.inductiveautomation.com/t/perspective-flex-repeater-auto-fit-contents-how/43106/3 "2021-02-07T16:02:23Z")

</div>

Fantastic!  
For anyone else …

 ![Perspective Flex Repeater basis auto](https://us1.discourse-cdn.com/inductiveautomation/original/3X/4/7/47eeb4be21394522a61537ea40214c1ee4805283.png)

1. Deep select the flex repeater.
2. grow : 0. (Under POSITION not PROPS.)
3. shrink : 0.
4. basis : **auto**

Lovely.

---

<div class="post-metadata">

**Author:** ![Eugene49](https://avatars.discourse-cdn.com/v4/letter/e/c6cbf5/32.png) [@Eugene49](https://forum.inductiveautomation.com/u/Eugene49)\
**Post date:** [August 8, 2023, 12:06am UTC](https://forum.inductiveautomation.com/t/perspective-flex-repeater-auto-fit-contents-how/43106/4 "2023-08-08T00:06:21Z")

</div>

Nice! Didn't know you could do that just like that. flex container basis adjusted base on its content.
