# Table expandSubviews() on first load

**URL:** <https://forum.inductiveautomation.com/t/table-expandsubviews-on-first-load/75395>\
**Category:** Ignition\
**Tags:** ignition81, perspective, scripting\
**Created:** [June 22, 2023, 1:52pm UTC](https://forum.inductiveautomation.com/t/table-expandsubviews-on-first-load/75395 "2023-06-22T13:52:16Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jburgess](https://avatars.discourse-cdn.com/v4/letter/j/9dc877/32.png) [@jburgess](https://forum.inductiveautomation.com/u/jburgess)\
**Post date:** [June 22, 2023, 1:52pm UTC](https://forum.inductiveautomation.com/t/table-expandsubviews-on-first-load/75395/1 "2023-06-22T13:52:16Z")

</div>

We've added **self.expandSubviews()** to the change script for the data of a Table component. This forces the expansion in all cases _except the first page load_. I'm sure it's a timing issue (e.g. the view isn't fully defined, so there's nothing to expand at the time of the call), but I'm hoping for a simple place to move the call.

Is there a "the page is fully loaded" hook somewhere where we can do the expansion so it works on even the first load?

Or if my thinking about the root cause is not correct, can someone provide a solution?

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [June 22, 2023, 2:00pm UTC](https://forum.inductiveautomation.com/t/table-expandsubviews-on-first-load/75395/2 "2023-06-22T14:00:44Z")

</div>

~~Try a change event action for the table's data.~~

---

<div class="post-metadata">

**Author:** ![jburgess](https://avatars.discourse-cdn.com/v4/letter/j/9dc877/32.png) [@jburgess](https://forum.inductiveautomation.com/u/jburgess)\
**Post date:** [June 22, 2023, 2:42pm UTC](https://forum.inductiveautomation.com/t/table-expandsubviews-on-first-load/75395/3 "2023-06-22T14:42:20Z")

</div>

Sorry, but is your answer different than "added...to the change script for the data of a Table component" as shown below? I may be missing the difference.

And I forgot to say that we also tried adding the call to the transform() script of the data binding, but still see the same issue.

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

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [June 22, 2023, 2:51pm UTC](https://forum.inductiveautomation.com/t/table-expandsubviews-on-first-load/75395/4 "2023-06-22T14:51:12Z")

</div>

Whoops, too early in the morning.

My uncaffeinated brain substituted "view startup".
