File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -110,9 +110,6 @@ class Model extends Base {
110110 NeoArray . remove ( itemCollection , item ) ;
111111
112112 if ( ! silent ) {
113- // We need a bigger depth, since grid.Container & table.Container use selection.Model as a top-level config.
114- // In case the config would get moved to grid.View & table.View, we would not need it.
115- view . updateDepth = - 1 ;
116113 view . update ( ) ;
117114
118115 me . fire ( 'selectionChange' , {
@@ -140,9 +137,6 @@ class Model extends Base {
140137 } ) ;
141138
142139 if ( ! silent && items . length > 0 ) {
143- // We need a bigger depth, since grid.Container & table.Container use selection.Model as a top-level config.
144- // In case the config would get moved to grid.View & table.View, we would not need it.
145- view . updateDepth = - 1 ;
146140 view . update ( )
147141 }
148142
@@ -252,9 +246,6 @@ class Model extends Base {
252246 NeoArray . add ( itemCollection , items ) ;
253247
254248 if ( ! view . silentSelect ) {
255- // We need a bigger depth, since grid.Container & table.Container use selection.Model as a top-level config.
256- // In case the config would get moved to grid.View & table.View, we would not need it.
257- view . updateDepth = - 1 ;
258249 view . update ( )
259250 }
260251
Original file line number Diff line number Diff line change @@ -22,48 +22,6 @@ class BaseModel extends Model {
2222 get dataFields ( ) {
2323 return this . view . parent . columns . map ( c => c . dataField )
2424 }
25-
26- /**
27- * @param {Object } item
28- * @param {Boolean } [silent] true to prevent a vdom update
29- * @param {Object[]|String[] } itemCollection=this.items
30- * @param {String } [selectedCls]
31- */
32- deselect ( item , silent , itemCollection = this . items , selectedCls ) {
33- let { view} = this ;
34-
35- if ( ! silent ) {
36- view . updateDepth = 2
37- }
38-
39- super . deselect ( item , silent , itemCollection , selectedCls )
40- }
41-
42- /**
43- * @param {Boolean } [silent] true to prevent a vdom update
44- */
45- deselectAll ( silent ) {
46- let { view} = this ;
47-
48- if ( ! silent ) {
49- view . updateDepth = 2
50- }
51-
52- super . deselectAll ( silent )
53- }
54-
55- /**
56- * @param {Object } args
57- */
58- select ( ...args ) {
59- let { view} = this ;
60-
61- if ( ! view . silentSelect ) {
62- view . updateDepth = 2
63- }
64-
65- super . select ( ...args )
66- }
6725}
6826
6927export default Neo . setupClass ( BaseModel ) ;
Original file line number Diff line number Diff line change @@ -14,48 +14,6 @@ class BaseModel extends Model {
1414 */
1515 className : 'Neo.selection.table.BaseModel'
1616 }
17-
18- /**
19- * @param {Object } item
20- * @param {Boolean } [silent] true to prevent a vdom update
21- * @param {Object[]|String[] } itemCollection=this.items
22- * @param {String } [selectedCls]
23- */
24- deselect ( item , silent , itemCollection = this . items , selectedCls ) {
25- let { view} = this ;
26-
27- if ( ! silent ) {
28- view . updateDepth = 2
29- }
30-
31- super . deselect ( item , silent , itemCollection , selectedCls )
32- }
33-
34- /**
35- * @param {Boolean } [silent] true to prevent a vdom update
36- */
37- deselectAll ( silent ) {
38- let { view} = this ;
39-
40- if ( ! silent ) {
41- view . updateDepth = 2
42- }
43-
44- super . deselectAll ( silent )
45- }
46-
47- /**
48- * @param {Object } args
49- */
50- select ( ...args ) {
51- let { view} = this ;
52-
53- if ( ! view . silentSelect ) {
54- view . updateDepth = 2
55- }
56-
57- super . select ( ...args )
58- }
5917}
6018
6119export default Neo . setupClass ( BaseModel ) ;
Original file line number Diff line number Diff line change @@ -64,10 +64,7 @@ class CellRowModel extends CellModel {
6464
6565 NeoArray . remove ( me . selectedRowIds , rowId ) ;
6666
67- if ( ! silent ) {
68- view . updateDepth = 2 ;
69- view . update ( )
70- }
67+ ! silent && view . update ( )
7168 }
7269
7370 /**
@@ -132,10 +129,7 @@ class CellRowModel extends CellModel {
132129 me . selectedRowIds . push ( id )
133130 }
134131
135- if ( ! silent ) {
136- view . updateDepth = 2 ;
137- view . update ( )
138- }
132+ ! silent && view . update ( )
139133 }
140134
141135 /**
You can’t perform that action at this time.
0 commit comments