File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 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.
788788` condition` should be a string with an angular expression. If that expression evaluates as thruthy
789789the field will be rendered into the DOM otherwise not. The expression is evaluated in the parent scope of
790790the ` 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 ` .
792792This is useful for hiding/showing parts of a form depending on another form control.
793793
794794ex. A checkbox that shows an input field for a code when checked
@@ -869,15 +869,15 @@ function FormCtrl($scope) {
869869 " persons[].eligible" ,
870870 {
871871 key: " persons[].code" ,
872- condition: " persons[arrayIndex].eligible" , // or "model[arrayIndex].eligable "
872+ condition: " persons[arrayIndex].eligible" , // or "model[arrayIndex].eligible "
873873 }
874874 ]
875875 }
876876 ]
877877}
878878` ` `
879879
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 ` .
881881
882882
883883### destroyStrategy
You can’t perform that action at this time.
0 commit comments