[IGN-2207] Is there a way to stop/intercept a Tab Container tab change?

There isn’t a way to prevent tab changing as of today, but I have two pieces of good news:

  1. Nightly 8.1.5 builds should have a code change which keeps Views running even while in tabs which are not active. You should see this change the behavior you’re experiencing such that your fields will retain their values as you switch tabs.
  2. I’ve also opened a feature request to allow for “disabling” tabs via a property of each tab. No ETA on when this feature could be implemented.
  3. If/when you take the content in 8.1.5, you could use that new behavior along with logic within a Change Script on the currentTabIndex property of the Tab Container to determine when a tab can be changed. Something like this:
# Use a message handler for each tab's internal view to declare when a form is complete.
complete = self.custom.complete  
if not complete:
    self.props.currentTabIndex = previousValue.value
1 Like