I am using ng2 smart table library ad when i clicked on edit than one column is editable rest column is not editable. before click on the edit button data is displayed in the all columns but after click on that some column fields are empty. How can I resolve this issue in ng2 smart table. I am sharing my angular code. #1346
here is my .ts component file code :
initDatesForm(){ this.today = new Date();
}
public calendarApplied(event:any) {
// if leader then he can select more than one user's and also other user's // if selected user value if(this.userRole === CONSTANTS.ROLE_ADMIN){ let dateMap = {"fromDate":event.picker.startDate._d, "toDate":event.picker.endDate._d, "projectId":this.selectedProject, "role": this.userRole} this.taskService.getDSRDetails(dateMap).subscribe((results) =>{ this.dsrReportDetails = results.data; const dsrChildData = this.dsrReportDetails.flatMap(( item: { userWiseDSRDtos: any[]; } ) => item.userWiseDSRDtos.flatMap(user => user.userDSRChildDtos)); console.log(dsrChildData); this.source = new LocalDataSource(dsrChildData); }) }else{ let dateMap = {"fromDate":event.picker.startDate._d, "toDate":event.picker.endDate._d, "projectId":this.selectedProject, "role": this.selectedProjectData} this.taskService.getDSRDetails(dateMap).subscribe((results) =>{ this.dsrReportDetails = results.data; const dsrChildData = this.dsrReportDetails.flatMap(( item: { userWiseDSRDtos: any[]; } ) => item.userWiseDSRDtos.flatMap(user => user.userDSRChildDtos)); console.log(dsrChildData); this.source = new LocalDataSource(dsrChildData); }) }
}
settings = {
columns: {
};
here is my html component code