getPushResultIndex
getPushResultIndex
Returns the index of the DataSet row that real-time push data was applied to.
Parameters
dmName(String): The DataSet name (DM name)blockName(String): The block name
Returns: List — the index of the row the push data was applied to, or -1 if there is none
Description
Calling it inside a subscribeData callback or an onResponseUpdate event handler tells you which row this push updated. Use it to highlight a specific row or to scroll to it.
Example
$vm.subscribeData("stockProvider", function(data) {
var idx = $vm.getPushResultIndex("stockProvider");
$log.i("업데이트된 행 인덱스:", idx);
// 해당 행으로 current 이동
if (idx >= 0) {
$vm.setDSCurrent("ds.stockList", idx);
}
});
Related
$vm.subscribeData(provInstName, callback)— start a real-time subscription$vm.getPiResultValue(piName, blockPath)— read a value from the last response