# How to size a table subview

**URL:** <https://forum.inductiveautomation.com/t/how-to-size-a-table-subview/32169>\
**Category:** Ignition Early Access\
**Tags:** perspective\
**Created:** [February 12, 2020, 4:03pm UTC](https://forum.inductiveautomation.com/t/how-to-size-a-table-subview/32169 "2020-02-12T16:03:26Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![md.szyman](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/md.szyman/32/9240_2.png) [@md.szyman](https://forum.inductiveautomation.com/u/md.szyman)\
**Post date:** [February 12, 2020, 4:03pm UTC](https://forum.inductiveautomation.com/t/how-to-size-a-table-subview/32169/1 "2020-02-12T16:03:26Z")

</div>

As shown in the screenshot below, I have a subview for a table defined but it is much taller than I’d like it to be. I’ve tried setting the `defaultSize.height` property on the subview’s view itself but that seems to have no effect. There seem to be no settings for the subview size in the `rows.subview` properties in the Table itself. If it matters, the subview’s root container is a Flex container.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/2X/9/9a2977d9a36dcbb96b1c5db1e22f7cded3500dca.png)

Am I missing something or is there just no way to change the height of a subview?

---

<div class="post-metadata">

**Author:** ![janne.p](https://avatars.discourse-cdn.com/v4/letter/j/7ea924/32.png) [@janne.p](https://forum.inductiveautomation.com/u/janne.p)\
**Post date:** [July 21, 2020, 12:28pm UTC](https://forum.inductiveautomation.com/t/how-to-size-a-table-subview/32169/2 "2020-07-21T12:28:47Z")

</div>

I have also same issue but I use table as subview to list more detailed rows.

Also using Flex container

It would be nice that there could be possibility to set basis to auto so that it would always the right size

---

<div class="post-metadata">

**Author:** ![ryanjmclaughlin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ryanjmclaughlin/32/4318_2.png) [@ryanjmclaughlin](https://forum.inductiveautomation.com/u/ryanjmclaughlin)\
**Post date:** [November 19, 2020, 8:19pm UTC](https://forum.inductiveautomation.com/t/how-to-size-a-table-subview/32169/3 "2020-11-19T20:19:38Z")

</div>

Anyone find a solution to this?

I implemented a table with a subview that contains a table of the related records to the parent table. I would like the subview to somewhat auto-size to the size of the subtable rather than it having a lot of whitespace or forcing scrolling.

---

<div class="post-metadata">

**Author:** ![danieltalbot](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/danieltalbot/32/11201_2.png) [@danieltalbot](https://forum.inductiveautomation.com/u/danieltalbot)\
**Post date:** [November 19, 2020, 8:48pm UTC](https://forum.inductiveautomation.com/t/how-to-size-a-table-subview/32169/4 "2020-11-19T20:48:33Z")

</div>

Set the component’s basis in your embedded subview to auto.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/f/8/f8f19397705e2e95d5cef4412788e6ef66f56b67.png)  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/d/0/d08aefe400bce31ce2e871dffa58457974bf70e5.png)

small:

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/1/2/126e7345e028d14094789e5d7af12d9e9e99c95f.png)  
expanded (look at the row below the subview; it has been pushed down a little more because the subview grew):  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/9/3/93288902d3ba1a6c40a68b12cd9a170df743cc77.png)

I can’t get it to work for embedded table subviews right now… the auto basis on a table seems to size the component so that only the header is visible.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/b/9/b922c5204247f8a717d04d4e5c8b59bb2226ea18.png)

---

<div class="post-metadata">

**Author:** ![ryanjmclaughlin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ryanjmclaughlin/32/4318_2.png) [@ryanjmclaughlin](https://forum.inductiveautomation.com/u/ryanjmclaughlin)\
**Post date:** [November 20, 2020, 1:02am UTC](https://forum.inductiveautomation.com/t/how-to-size-a-table-subview/32169/5 "2020-11-20T01:02:45Z")

</div>

Did not know about the auto basis, missed that, thanks!

But your right, it does not seem to work with subview tables

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/d/4/d45151660e23628239a11d4dcc3cab1be1cb5518.png)

---

<div class="post-metadata">

**Author:** ![nicolas.griffon](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nicolas.griffon/32/16603_2.png) [@nicolas.griffon](https://forum.inductiveautomation.com/u/nicolas.griffon)\
**Post date:** [May 31, 2021, 10:12am UTC](https://forum.inductiveautomation.com/t/how-to-size-a-table-subview/32169/6 "2021-05-31T10:12:41Z")

</div>

Hello everyone,  
is there any news about this option in new versions?

---

<div class="post-metadata">

**Author:** ![ryanjmclaughlin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ryanjmclaughlin/32/4318_2.png) [@ryanjmclaughlin](https://forum.inductiveautomation.com/u/ryanjmclaughlin)\
**Post date:** [June 1, 2021, 12:52am UTC](https://forum.inductiveautomation.com/t/how-to-size-a-table-subview/32169/7 "2021-06-01T00:52:26Z")

</div>

Just bumped to 8.1.6 this week and auto-height is subviews seems to work fine now.

---

<div class="post-metadata">

**Author:** ![nicolas.griffon](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nicolas.griffon/32/16603_2.png) [@nicolas.griffon](https://forum.inductiveautomation.com/u/nicolas.griffon)\
**Post date:** [June 1, 2021, 7:11am UTC](https://forum.inductiveautomation.com/t/how-to-size-a-table-subview/32169/8 "2021-06-01T07:11:05Z")

</div>

I’m in 8.1.4 and it doesn’t work.  
I don’t see any change about this point in the [Release Notes](https://docs.inductiveautomation.com/display/DOC81/New+in+this+Version)

Maybe I don’t set basis=auto on the good component.

---

<div class="post-metadata">

**Author:** ![ryanjmclaughlin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ryanjmclaughlin/32/4318_2.png) [@ryanjmclaughlin](https://forum.inductiveautomation.com/u/ryanjmclaughlin)\
**Post date:** [June 8, 2021, 2:25pm UTC](https://forum.inductiveautomation.com/t/how-to-size-a-table-subview/32169/9 "2021-06-08T14:25:03Z")

</div>

Ok, so the behavior is weird. I have one page where it works, and another where it doesn’t. However on the one where it doesn’t, the props.data takes a second to run the DB query so it might not re-calculate the height after the rows are loaded.

There was a change to add a rows.height parameter, I think this change made this partially work, but not in all situations. @cmallonee Is this related to FEATURE-16567, or just coincidental?

---

<div class="post-metadata">

**Author:** ![EWiehman](https://avatars.discourse-cdn.com/v4/letter/e/50afbb/32.png) [@EWiehman](https://forum.inductiveautomation.com/u/EWiehman)\
**Post date:** [February 15, 2023, 10:12am UTC](https://forum.inductiveautomation.com/t/how-to-size-a-table-subview/32169/10 "2023-02-15T10:12:02Z")

</div>

I'm still new to ignition so maybe this isn't the best way but it works for me.  
You can use some scripting to find the amount of instances appended in the dataset of the table to then set the size of the view that contains that table.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/4/c/4c7986db644be33dc52f0f7ed818b8df86731eb2.png)

The binding is made directly on the table's data property

I used import time to have each row instance appended incrementally on the view for visual effect. You need to also know how to get the necessary cell data from the parent table into the subview table.

The table in the flex container has grow set to 1 so the view's defaultSize.height is only changed

The important code is this:  
"""  
chute = self.view.params.value.chute  
rows = value.getRowCount()  
i = 0  
size = 30

while i \< rows:  
chuteTest = value.getValueAt(i, 0)  
if chute == chuteTest:  
size = size + 50  
self.view.props.defaultSize.height = size  
i = i + 1

return data  
"""

---

<div class="post-metadata">

**Author:** ![EWiehman](https://avatars.discourse-cdn.com/v4/letter/e/50afbb/32.png) [@EWiehman](https://forum.inductiveautomation.com/u/EWiehman)\
**Post date:** [February 15, 2023, 10:16am UTC](https://forum.inductiveautomation.com/t/how-to-size-a-table-subview/32169/11 "2023-02-15T10:16:21Z")

</div>

You could have a query tag run the db query and bind the props.data to the query tag and evaluate the data in the binding to check its .getRowCount() and use that to set the view size

---

<div class="post-metadata">

**Author:** ![justin\_potter](https://avatars.discourse-cdn.com/v4/letter/j/ecc23a/32.png) [@justin\_potter](https://forum.inductiveautomation.com/u/justin_potter)\
**Post date:** [December 5, 2024, 6:42pm UTC](https://forum.inductiveautomation.com/t/how-to-size-a-table-subview/32169/12 "2024-12-05T18:42:40Z")

</div>

I faced the same issue until I changed the `table.props.virtualized` setting to `false` in the subview table. Additionally, make sure that the `table.position.basis` is configured as follows: `basis: auto`. Now everything works correctly, and the subview will push the rows down as needed.

---

<div class="post-metadata">

**Author:** ![tyler.robertson](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/tyler.robertson/32/18299_2.png) [@tyler.robertson](https://forum.inductiveautomation.com/u/tyler.robertson)\
**Post date:** [October 24, 2025, 4:37pm UTC](https://forum.inductiveautomation.com/t/how-to-size-a-table-subview/32169/13 "2025-10-24T16:37:23Z")

</div>

missed the component auto, thank you!
