1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 |
|
11 |
|
12 |
|
13 |
|
14 |
|
15 |
|
16 | var toggleSelect = function toggleSelect(type) {
|
17 | var index = this.parent.getRowIndex(this);
|
18 | var selectindices = this.parent.getSelectedIndices();
|
19 | if (selectindices.indexOf(index) != -1) {
|
20 | this.parent.setRowUnSelect(index);
|
21 | } else {
|
22 | if (type === 'single') this.parent.setRowSelect(index);else this.parent.addRowSelect(index);
|
23 | }
|
24 | };
|
25 |
|
26 | var singleSelect = function singleSelect() {
|
27 | this.toggleSelect('single');
|
28 | };
|
29 |
|
30 | var multiSelect = function multiSelect() {
|
31 | this.toggleSelect('multi');
|
32 | };
|
33 |
|
34 | export var rowRowSelectFunObj = {
|
35 | toggleSelect: toggleSelect,
|
36 | singleSelect: singleSelect,
|
37 | multiSelect: multiSelect
|
38 | }; |
\ | No newline at end of file |