我正在尝试创建一个Google表单克隆,这是它的样子
当我向下拖动第一个表格时,会发生这种情况
mat-select值不变,并且复选框选项不见了。对于放置功能,我有这个
drop(event: CdkDragDrop<string[]>) {
this.list = this.surveyForm.get("sectionQuestions")["controls"];
console.log(this.list);
moveItemInArray(this.list, event.previousIndex, event.currentIndex);
this.questionFormArray.controls[event.currentIndex]['controls']['display_order']
.setValue(event.currentIndex + 1);
this.questionFormArray.controls.forEach((category, index) => {
(category as FormGroup).controls['display_order'].setValue(index + 1);
});
}
我错过了什么吗?通过设置display_order还不够吗?任何想法都会有所帮助