final remark issue fixed

This commit is contained in:
bitbucket 2022-02-01 09:53:55 +05:30
parent 512c7a7f6a
commit cc0046d3e5

View File

@ -214,19 +214,18 @@ export class DynamicFormComponent implements OnInit {
removeData(index,json_obj) {
// 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
console.log(control)
control.removeAt(index)
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){
this.json_answers.cm_queries.splice(index,1)
}
}
console.log(control)
json_obj.group_questions.splice(index,1)
this.step = control.length-1