final remark issue fixed
This commit is contained in:
parent
512c7a7f6a
commit
cc0046d3e5
@ -214,19 +214,18 @@ export class DynamicFormComponent implements OnInit {
|
|||||||
removeData(index,json_obj) {
|
removeData(index,json_obj) {
|
||||||
|
|
||||||
// debugger;
|
// debugger;
|
||||||
console.log(json_obj)
|
|
||||||
console.log(json_obj.group_key)
|
|
||||||
console.log(this.json_answers);
|
|
||||||
let control = this.form_group_name.get(json_obj.group_key) as FormArray
|
let control = this.form_group_name.get(json_obj.group_key) as FormArray
|
||||||
console.log(control)
|
console.log(control)
|
||||||
control.removeAt(index)
|
control.removeAt(index)
|
||||||
if(this.json_answers){
|
if(this.json_answers){
|
||||||
|
if(this.json_answers[json_obj.group_key] != null && this.json_answers[json_obj.group_key] instanceof Array){
|
||||||
|
this.json_answers[json_obj.group_key].splice(index,1)
|
||||||
|
}
|
||||||
if(this.json_answers.cm_queries instanceof Array){
|
if(this.json_answers.cm_queries instanceof Array){
|
||||||
this.json_answers.cm_queries.splice(index,1)
|
this.json_answers.cm_queries.splice(index,1)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
console.log(control)
|
console.log(control)
|
||||||
json_obj.group_questions.splice(index,1)
|
json_obj.group_questions.splice(index,1)
|
||||||
this.step = control.length-1
|
this.step = control.length-1
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user