Skip to content

Commit

Permalink
SVY-11073 Bootstrap tabpanel becomes unresponsive when changing tabindex
Browse files Browse the repository at this point in the history
programatically
  • Loading branch information
lvostinar committed Apr 21, 2017
1 parent 8dcc871 commit 7646f48
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tabpanel/tabpanel.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,12 @@ angular.module('bootstrapcomponentsTabpanel',['servoy']).directive('bootstrapcom
$scope.$watch("model.tabIndex", function(newValue,oldValue) {
if (newValue !== oldValue)
{
if (!$scope.model.tabs[newValue-1])
{
// invalid, revert to old value
$scope.model.tabIndex = oldValue;
return;
}
if (oldValue)
{
$scope.svyServoyapi.hideForm($scope.model.tabs[oldValue-1].containedForm);
Expand Down

0 comments on commit 7646f48

Please sign in to comment.