File tree Expand file tree Collapse file tree 4 files changed +6
-19
lines changed Expand file tree Collapse file tree 4 files changed +6
-19
lines changed Original file line number Diff line number Diff line change @@ -57,17 +57,13 @@ Doo.define(
57
57
}
58
58
return data
59
59
}
60
- getIndex ( row ) {
61
- return this . data . rows . findIndex ( ( item , i ) => item . id === row . key )
62
- }
63
60
64
61
delete ( elem ) {
65
62
let row = this . getParentRow ( elem )
66
63
if ( row ) {
67
- let idx = this . getIndex ( row )
68
64
this . tbody . removeChild ( row )
69
- if ( idx !== undefined && idx !== - 1 ) {
70
- this . data . rows . splice ( idx , 1 )
65
+ if ( row . key !== undefined ) {
66
+ this . data . rows . splice ( row , 1 )
71
67
}
72
68
}
73
69
}
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " js-framework-benchmark-doohtml" ,
3
- "version" : " 0.92.1 " ,
3
+ "version" : " 0.92.2 " ,
4
4
"description" : " DooHTML-DOM (no shadow) JS-Benchmark" ,
5
5
"main" : " Main.class.js" ,
6
6
"js-framework-benchmark" : {
Original file line number Diff line number Diff line change @@ -60,22 +60,13 @@ Doo.define(
60
60
}
61
61
return data
62
62
}
63
- getIndex ( row ) {
64
- let idx = this . data . rows . findIndex ( ( item , i ) => {
65
- if ( item . id === row . key ) {
66
- return i
67
- }
68
- } )
69
- return idx
70
- }
71
63
72
64
delete ( elem ) {
73
65
let row = this . getParentRow ( elem )
74
66
if ( row ) {
75
- let idx = this . getIndex ( row )
76
67
this . tbody . removeChild ( row )
77
- if ( idx !== undefined ) {
78
- this . data . rows . splice ( idx , 1 )
68
+ if ( row . key !== undefined ) {
69
+ this . data . rows . splice ( row . key , 1 )
79
70
}
80
71
}
81
72
}
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " js-framework-benchmark-doohtml" ,
3
- "version" : " 0.92.1 " ,
3
+ "version" : " 0.92.2 " ,
4
4
"description" : " DooHTML JS-Benchmark" ,
5
5
"main" : " Main.class.js" ,
6
6
"js-framework-benchmark" : {
You can’t perform that action at this time.
0 commit comments