vitalets / angular-xeditable

Edit in place for AngularJS
http://vitalets.github.io/angular-xeditable
MIT License
1.91k stars 403 forks source link

why $cancel() will add a new row #698

Open bravility opened 7 years ago

bravility commented 7 years ago

why $cancel() will add a new row,how to cancel it? why cancel will add a new row

demo: http://vitalets.github.io/angular-xeditable/#editable-row

ckosloski commented 7 years ago

You have to remove the item that was added to the array when you click add row. There is an example in editable-table

ckosloski commented 6 years ago

@bravility can this be closed now?

bravility commented 6 years ago

@ckosloski To some extent, yes. But I would rather use Editable row than Editable table, can I fix it in Editable row? instead of use Editable table

ckosloski commented 6 years ago

All you need to do is call a function on cancel that removes the last item in your list $scope.movieCharacterModel.characters.splice(index, 1);