Recently, I incorporated ng2-dragula to enable Drag and Drop functionality in my Table.
this.dragulaService.drop.subscribe(value => {
let questions_group = value[3] as HTMLTableRowElement
let SectionTwo:Array<string> = [];
let QuestionId:Array<string> = [];
let OrderNo:Array<number> = [];
var list2 = questions_group.childNodes;
list2.forEach(
function(currentValue, currentIndex,listObj) {
if(currentIndex!=0){
let sectionName2 = currentValue.lastChild.textContent
SectionTwo.push(sectionName2)
QuestionId.push(currentValue.firstChild.textContent)
OrderNo.push(currentIndex)
}
},
''
); });
Bafflingly, a sudden error has surfaced indicating that "Property 'forEach' does not exist on type 'NodeList'." Despite working flawlessly previously without any changes made.