Skip to content

Commit c979946

Browse files
committed
Removing last tab in a tabbarray selects previous
Fixes #77
1 parent fb56aae commit c979946

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/directives/array.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ angular.module('schemaForm').directive('sfArray', ['sfSelect', 'schemaForm', 'sf
100100
if (scope.validateArray) {
101101
scope.validateArray();
102102
}
103+
return list;
103104
};
104105

105106
// Always start with one empty form unless configured otherwise.

src/directives/decorators/bootstrap/tabarray.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
<sf-decorator form="copyWithIndex($index)"></sf-decorator>
2929

3030

31-
<button ng-click="deleteFromArray($index)"
31+
<button ng-click="selected.tab = deleteFromArray($index).length - 1"
3232
type="button"
3333
class="btn {{ form.style.remove || 'btn-default' }} pull-right">
3434
<i class="glyphicon glyphicon-trash"></i>

0 commit comments

Comments
 (0)