0

我有两个网格结构,其中一个我有多个字段多次,而在一个中我有两个字段一次。我为每个网格编写应用方法,我的第一个网格 id 工作正常,但是当我在第二个网格上单击应用时,我收到此错误

Uncaught TypeError: Converting circular structure to JSON  

以下是两种应用方法:

self.applyRate = function (loan) {
    //  commit the edit transaction
    self.editTransaction.notifySubscribers(null, "commit");
    alert(ko.toJSON({data:loan}));
    //  hides the edit fields
    self.editingItem(null);
};
   self.apply = function (data) {
    //  commit the edit transaction
    self.editTransaction.notifySubscribers(null, "commit");
    alert(ko.toJSON({data:data}));
    self.editingItem(null);
};

applyRate()当我单击编辑时调用,然后单击第一个网格上的应用,即贷款。

单击“申请强制性和福利”文本字段时出现问题。

这是一个 Js Fiddle 链接:DEMO

4

0 回答 0