File tree 1 file changed +3
-3
lines changed
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -788,7 +788,7 @@ the surface it uses `ng-if` so the hidden field is *not* part of the form.
788
788
` condition` should be a string with an angular expression. If that expression evaluates as thruthy
789
789
the field will be rendered into the DOM otherwise not. The expression is evaluated in the parent scope of
790
790
the ` sf- schema` directive (the same as onClick on buttons) but with access to the current model,
791
- current model value and current array index under the name ` model` , ` modelValue` and ` arrayIndex` .
791
+ current model value and current array index under the name ` model` , ` modelValue` and ` arrayIndex` / ` arrayIndices ` .
792
792
This is useful for hiding/showing parts of a form depending on another form control.
793
793
794
794
ex. A checkbox that shows an input field for a code when checked
@@ -869,15 +869,15 @@ function FormCtrl($scope) {
869
869
" persons[].eligible" ,
870
870
{
871
871
key: " persons[].code" ,
872
- condition: " persons[arrayIndex].eligible" , // or "model[arrayIndex].eligable "
872
+ condition: " persons[arrayIndex].eligible" , // or "model[arrayIndex].eligible "
873
873
}
874
874
]
875
875
}
876
876
]
877
877
}
878
878
` ` `
879
879
880
- Note that arrays inside arrays won't work with conditions .
880
+ Arrays-in- arrays must use ` arrayIndices ` . e.g. ` model[arrayIndices[ 0 ]]. child [arrayIndices[ 1 ]]. etc ` .
881
881
882
882
883
883
### destroyStrategy
You can’t perform that action at this time.
0 commit comments