UNPKG

656 BJavaScriptView Raw
1/**
2 * Module : kero dataTable rowCurrent
3 * Author : liuyk(liuyk@yonyou.com)
4 * Date : 2016-08-08 09:59:01
5 */
6
7
8
9
10const updateCurrIndex = function () {
11 var currentIndex = this.focusIndex() != -1 ? this.focusIndex() : this.getSelectedIndex();
12 if (this._oldCurrentIndex != currentIndex) {
13 this._oldCurrentIndex = currentIndex;
14 this.trigger(DataTable.ON_CURRENT_ROW_CHANGE)
15 this.currentRowChange(-this.currentRowChange());
16 if (this.ns){
17 if (this.root.valueChange[this.ns])
18 this.root.valueChange[this.ns](-this.root.valueChange[this.ns]());
19 }
20
21 }
22}
23
24export {
25 updateCurrIndex
26}
\No newline at end of file