# \[Feature Request\] - Add property to Tab Container to save state of embedded views

**URL:** <https://forum.inductiveautomation.com/t/feature-request-add-property-to-tab-container-to-save-state-of-embedded-views/82471>\
**Category:** Ignition\
**Tags:** ignition81, perspective\
**Created:** [November 29, 2023, 11:33am UTC](https://forum.inductiveautomation.com/t/feature-request-add-property-to-tab-container-to-save-state-of-embedded-views/82471 "2023-11-29T11:33:59Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![laura.strydom](https://avatars.discourse-cdn.com/v4/letter/l/3da27b/32.png) [@laura.strydom](https://forum.inductiveautomation.com/u/laura.strydom)\
**Post date:** [November 29, 2023, 11:34am UTC](https://forum.inductiveautomation.com/t/feature-request-add-property-to-tab-container-to-save-state-of-embedded-views/82471/1 "2023-11-29T11:34:00Z")

</div>

Good day,

I want to submit a feature request to add a property to the Tab Container that will allow to save the state of embedded views when switching between tabs.

Currently, the Tabs property has an internal property called runWhileHidden, and it determines if contents of the tab loads once the tab is first activated, and if it should persist while in the background when the **currentTabIndex** changes.

While this works, when another view is embedded on a tab, any changes made on the embedded view doesn't persist when switching between tabs.  
A current workaround is to pass the data back up to the embedded view binding by changing all bindings for passing the data down to bidirectional. This is not great, especially if you have to do it for a lot of parameter bindings just for 1 view; and then your tab container has multiple embedded views 😑

It will definitely make life easier if another property can be added that allows child components to stay persistent upon tab changes.

Thanks!

---

<div class="post-metadata">

**Author:** ![jlandwerlen](https://avatars.discourse-cdn.com/v4/letter/j/bc8723/32.png) [@jlandwerlen](https://forum.inductiveautomation.com/u/jlandwerlen)\
**Post date:** [November 29, 2023, 11:47am UTC](https://forum.inductiveautomation.com/t/feature-request-add-property-to-tab-container-to-save-state-of-embedded-views/82471/2 "2023-11-29T11:47:53Z")

</div>

You should post here as well.

> **[Inductive Automation Feedback](https://ideas.inductiveautomation.com/)**
>
> Give feedback to the Inductive Automation team so we can make more informed product decisions. Powered by Canny.

---

<div class="post-metadata">

**Author:** ![pascal.fragnoud](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pascal.fragnoud/32/24728_2.png) [@pascal.fragnoud](https://forum.inductiveautomation.com/u/pascal.fragnoud)\
**Post date:** [November 29, 2023, 12:00pm UTC](https://forum.inductiveautomation.com/t/feature-request-add-property-to-tab-container-to-save-state-of-embedded-views/82471/3 "2023-11-29T12:00:40Z")

</div>

> [@laura.strydom](#):
>
> While this works, when another view is embedded on a tab, any changes made on the embedded view doesn't persist when switching between tabs.

Really ? It seems to work for me. Can you give more details on what doesn't work ?

---

<div class="post-metadata">

**Author:** ![laura.strydom](https://avatars.discourse-cdn.com/v4/letter/l/3da27b/32.png) [@laura.strydom](https://forum.inductiveautomation.com/u/laura.strydom)\
**Post date:** [November 29, 2023, 12:23pm UTC](https://forum.inductiveautomation.com/t/feature-request-add-property-to-tab-container-to-save-state-of-embedded-views/82471/4 "2023-11-29T12:23:30Z")

</div>

So in our testing, the embedded view on the first tab is a custom table made out of a flex repeater. It has a column for parameter names and a second column for the value of each. When the view is opened, the default values get pulled through for the parameters.

 ![Screenshot 2023-11-29 at 14.18.44](https://us1.discourse-cdn.com/inductiveautomation/original/3X/4/3/43cb4325f63d7b0f37e1f4398e44cdd615510e95.png)

If you click on a parameter value, it allows you to change it (changed it from Null to Tanker 1.

 ![Screenshot 2023-11-29 at 14.19.24](https://us1.discourse-cdn.com/inductiveautomation/original/3X/8/9/89332cddcdfa79370b96416fdecf9302c1224af0.png)  
 ![Screenshot 2023-11-29 at 14.19.30](https://us1.discourse-cdn.com/inductiveautomation/original/3X/0/a/0aec7b0bdc48f3a199eb8b3add03e25a6faac6b8.png)

If you click on another tab, and then navigate back to the first, the values all change back to default.

 ![Screenshot 2023-11-29 at 14.19.39](https://us1.discourse-cdn.com/inductiveautomation/original/3X/1/b/1b8a6efaba125d453172147311907105e6eeae86.png)  
 ![Screenshot 2023-11-29 at 14.19.51](https://us1.discourse-cdn.com/inductiveautomation/original/3X/4/c/4cd62c700aa1c45ddd0c741d1ce25ad8fe15e400.png)

This happens even if we have runWhileHidden enabled on all tabs.  
 ![Screenshot 2023-11-29 at 14.22.27](https://us1.discourse-cdn.com/inductiveautomation/original/3X/d/5/d58241810bff932c6da0fe3cb2550d57e485afb2.png)

A short video would've demonstrated it better, but I hope the screenshots explain it somewhat.

---

<div class="post-metadata">

**Author:** ![Hayden\_Watson](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/hayden_watson/32/48792_2.png) [@Hayden\_Watson](https://forum.inductiveautomation.com/u/Hayden_Watson)\
**Post date:** [November 29, 2023, 1:30pm UTC](https://forum.inductiveautomation.com/t/feature-request-add-property-to-tab-container-to-save-state-of-embedded-views/82471/5 "2023-11-29T13:30:31Z")

</div>

Would it be possible to create an object in your custom session properties and bind them to there. They should then persist for that entire session.
