1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 |
|
11 |
|
12 |
|
13 |
|
14 |
|
15 |
|
16 | const toggleSelect = function(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')
|
23 | this.parent.setRowSelect(index);
|
24 | else
|
25 | this.parent.addRowSelect(index);
|
26 | }
|
27 | };
|
28 |
|
29 |
|
30 | const singleSelect = function() {
|
31 | this.toggleSelect('single');
|
32 | };
|
33 |
|
34 | const multiSelect = function() {
|
35 | this.toggleSelect('multi');
|
36 | };
|
37 |
|
38 | export const rowRowSelectFunObj = {
|
39 | toggleSelect: toggleSelect,
|
40 | singleSelect: singleSelect,
|
41 | multiSelect: multiSelect
|
42 | }
|