Angular get row data present just below the Row that has been edited

自作多情 提交于 2020-01-17 15:49:11

问题


Angular using p-table for displaying table after getting row data from service.

Two columns viz - Date, CashValue are there

Now after editing CashValue column, how can i get CashValue of the row just below the row that has been edited.

 <input> type="text" [(ngModel)]="rowValues.cashValue" (ngModelChange)="valueChange(rowValues.cashValue)" />

For example below is the table

Date         Cashvalue
21-Dec-2019  8000
14-Nov-2019  7000
8-Oct-2019   6000
5-Sep-2019   5000

Now on click of save after editing 6000 for Oct month how can i get CashValue for September ?? Similarly if i edit 7000 for November how can i get cashvalue of October ??

来源:https://stackoverflow.com/questions/59435846/angular-get-row-data-present-just-below-the-row-that-has-been-edited

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!