Skip to content

Commit ddcade9

Browse files
committed
#6451 examples.grid.bigData.ControlsContainer: selection model switch logic
1 parent eea3904 commit ddcade9

1 file changed

Lines changed: 17 additions & 5 deletions

File tree

examples/grid/bigData/ControlsContainer.mjs

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
1-
import ComboBox from '../../../src/form/field/ComboBox.mjs';
2-
import Container from '../../../src/container/Base.mjs';
3-
import Radio from '../../../src/form/field/Radio.mjs';
4-
import TabContainer from '../../../src/tab/Container.mjs';
1+
import CellColumnModel from '../../../src/selection/grid/CellColumnModel.mjs';
2+
import CellColumnRowModel from '../../../src/selection/grid/CellColumnRowModel.mjs';
3+
import CellModel from '../../../src/selection/grid/CellModel.mjs';
4+
import CellRowModel from '../../../src/selection/grid/CellRowModel.mjs';
5+
import ColumnModel from '../../../src/selection/grid/ColumnModel.mjs';
6+
import ComboBox from '../../../src/form/field/ComboBox.mjs';
7+
import Container from '../../../src/container/Base.mjs';
8+
import Radio from '../../../src/form/field/Radio.mjs';
9+
import RowModel from '../../../src/selection/grid/RowModel.mjs';
10+
import TabContainer from '../../../src/tab/Container.mjs';
511

612
/**
713
* @class Neo.examples.grid.bigData.ControlsContainer
@@ -139,17 +145,23 @@ class ControlsContainer extends Container {
139145
text : 'Pick the Selection Model'
140146
}, {
141147
style : {marginTop: '1em'},
148+
selectionModel: CellModel,
142149
valueLabelText: 'Cell'
143150
}, {
151+
selectionModel: ColumnModel,
144152
valueLabelText: 'Column'
145153
}, {
146154
checked : true,
155+
selectionModel: RowModel,
147156
valueLabelText: 'Row'
148157
}, {
158+
selectionModel: CellColumnModel,
149159
valueLabelText: 'Cell & Column'
150160
}, {
161+
selectionModel: CellRowModel,
151162
valueLabelText: 'Cell & Row'
152163
}, {
164+
selectionModel: CellColumnRowModel,
153165
valueLabelText: 'Cell & Column & Row'
154166
}]
155167
}]
@@ -249,7 +261,7 @@ class ControlsContainer extends Container {
249261
* @param {Object} data
250262
*/
251263
onSelectionModelChange(data) {
252-
console.log(data)
264+
this.grid.view.selectionModel = data.component.selectionModel
253265
}
254266

255267
/**

0 commit comments

Comments
 (0)