问题
When combining angular-datatables and angular-xeditable, editable row is canceled when adding a new row.
This is the jsfiddle. Sample operation is as follows.
(1) This is initial state.
(2) editing first and third rows to status "status4".
(3) Press Add row
.
On (3)
, editting is canceled and status is reverted to "status1". My hope is both row1 and row3 are kept editting and status stays "status4". If without angular-datatables, it works as my hope as this jsfiddle, but I would like to use with datatables.
How can I fix?
回答1:
I had a DataTables table in Angular that I needed to make inline editable - this CellEdit plugin and its basic initialization code worked like a charm! Not sure if it supports adding new rows and deleting rows, though.
Hope this helps!
来源:https://stackoverflow.com/questions/44899030/angular-datatables-angular-xeditable-editable-row-canceled