【kViewer】レコード番号の取得について

gonさん

こんにちは。

 

kv.events.records.fetchedイベントで、一覧画面のレコード取得API正常終了後の処理を定義できます。

ここで取得されたstate.recordsをループすれば、各レコード情報に対して処理できます。

(function() {
'use strict';
kv.events.records.fetched = [function(state) {
state.records.forEach(function(record) {
console.log(record.$id.value);
});
return state;
}];
})();