Skip to content

Commit 857b5f8

Browse files
committed
Hide the Add link and Remove button if set to null
Tab array updated to behave the same as arrays where the Add link and Remove button are hidden if set to null
1 parent 52c64ff commit 857b5f8

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/tabarray.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
ng-class="{active: selected.tab === $index}">
1616
<a href="#">{{interp(form.title,{'$index':$index, value: item}) || $index}}</a>
1717
</li>
18-
<li ng-hide="form.readonly"
18+
<li ng-hide="form.readonly || form.add === null"
1919
ng-disabled="form.schema.maxItems <= modelArray.length"
2020
ng-click="$event.preventDefault() || (selected.tab = appendToArray().length - 1)">
2121
<a href="#">
@@ -36,7 +36,7 @@
3636

3737
<div schema-form-array-items></div>
3838

39-
<button ng-hide="form.readonly"
39+
<button ng-hide="form.readonly || form.remove === null"
4040
ng-click="selected.tab = deleteFromArray($index).length - 1"
4141
ng-disabled="form.schema.minItems >= modelArray.length"
4242
type="button"
@@ -60,7 +60,7 @@
6060
ng-class="{active: selected.tab === $index}">
6161
<a href="#">{{interp(form.title,{'$index':$index, value: item}) || $index}}</a>
6262
</li>
63-
<li ng-hide="form.readonly"
63+
<li ng-hide="form.readonly || form.add === null"
6464
ng-disabled="form.schema.maxItems <= modelArray.length"
6565
ng-click="$event.preventDefault() || (selected.tab = appendToArray().length - 1)">
6666
<a href="#">

0 commit comments

Comments
 (0)