File tree Expand file tree Collapse file tree 1 file changed +1
-21
lines changed
frameworks/keyed/doohtml/js Expand file tree Collapse file tree 1 file changed +1
-21
lines changed Original file line number Diff line number Diff line change @@ -57,6 +57,7 @@ Doo.define(
57
57
}
58
58
return data
59
59
}
60
+
60
61
getIndex ( row ) {
61
62
let idx = this . data . rows . findIndex ( ( item , i ) => {
62
63
if ( item . id === row . key ) {
@@ -79,38 +80,17 @@ Doo.define(
79
80
}
80
81
81
82
run ( ) {
82
-
83
83
this . clear ( )
84
84
this . data . rows = this . buildData ( )
85
85
this . renderTable ( )
86
-
87
86
}
88
87
89
- add ( ) {
90
- this . data . rows = this . data . rows . concat ( this . buildData ( ) )
91
- this . renderTable ( this . data . rows , this . data . rows . length )
92
- }
93
88
add ( ) {
94
89
let startRow = this . data . rows . length
95
90
this . data . rows = this . data . rows . concat ( this . buildData ( ) )
96
91
this . renderTable ( this . data . rows , startRow )
97
-
98
92
}
99
93
100
- renderTable ( dataSet = this . data [ this . defaultDataSet ] , start = 0 ) {
101
- // debugger
102
- let len = dataSet . length - start
103
- let elem = document . createElement ( 'tbody' )
104
- elem . innerHTML = this . renderNode ( this . place [ 0 ] , dataSet , start , len )
105
- let tableRows = elem . querySelectorAll ( 'tr' )
106
- let newElem
107
- for ( let i = 0 ; i < len ; i ++ ) {
108
- newElem = this . place [ 0 ] . appendChild ( tableRows . item ( i ) )
109
- newElem . key = dataSet [ i ] . id
110
- }
111
- }
112
-
113
-
114
94
runLots ( ) {
115
95
this . clear ( )
116
96
this . data . rows = this . buildData ( 10000 )
You can’t perform that action at this time.
0 commit comments