我使用此代碼,以我的表中添加一個新行錶行:無法刪除
var CA = function() {
this.CAName = null;
this.CAAdress = null;
this.CAIdNum = null;
this.CAContact = null;
this.CAName = null;
this.CANote = null;
this.CAType = null;
};
newCreditRows = function() {
this.creditRows.push(new CA());
};
我的問題是,我不能刪除新行(由加功能newCreditRows
)。我試圖用幾種不同的方式做到這一點,如: this.creditRows.remove(CA);
但沒有運氣。我需要刪除它,因爲null值被插入到我的observable數組中,當我循環記錄時,它會產生很大的問題。我確信我錯過了一些非常小的東西,但作爲一名初級開發者,我無法修復它。