File tree Expand file tree Collapse file tree 4 files changed +12
-26
lines changed Expand file tree Collapse file tree 4 files changed +12
-26
lines changed Original file line number Diff line number Diff line change 1010 "build-prod" : " webpack -p"
1111 },
1212 "devDependencies" : {
13- "@riotjs/compiler" : " 4.7.0 " ,
13+ "@riotjs/compiler" : " 4.8.2 " ,
1414 "@riotjs/webpack-loader" : " 4.0.3" ,
15- "webpack" : " 4.42.0 " ,
15+ "webpack" : " 4.42.1 " ,
1616 "webpack-cli" : " 3.3.11"
1717 },
1818 "dependencies" : {
19- "riot" : " 4.11 .0"
19+ "riot" : " 4.12 .0"
2020 }
2121}
Original file line number Diff line number Diff line change 3939 </div >
4040 </div >
4141 </div >
42- <table class =' table table-hover table-striped test-data' onclick ={ handleClick } >
42+ <table class =' table table-hover table-striped test-data' >
4343 <tbody >
4444 <tr each ={ row in state .rows } key ={ row .id } class ={ rowClass (row ) }>
4545 <td class =' col-md-1' >{ row .id }</td >
4646 <td class =' col-md-4' >
47- <a data-action = " select " data-id ={ row .id }>{ row .label }</a >
47+ <a onclick ={() => select( row.id) }>{ row .label }</a >
4848 </td >
4949 <td class =' col-md-1' >
50- <a ><span data-action = " remove " data-id ={ row .id } class =' glyphicon glyphicon-remove' aria-hidden =' true' ></span ></a >
50+ <a ><span onclick ={() => remove( row.id) } class='glyphicon glyphicon-remove' aria-hidden='true'></span ></a >
5151 </td >
5252 <td class =' col-md-6' ></td >
5353 </tr >
6464 selected: this .store .selected
6565 }
6666 },
67- handleClick (event ) {
68- const { action , id } = event .target .dataset
69-
70- if (action && id) {
71- this [action](Number (id))
72- }
73- },
7467 rowClass (row ) {
7568 return row .id === this .state .selected ? ' danger' : ' '
7669 },
Original file line number Diff line number Diff line change 1010 "build-prod" : " webpack -p"
1111 },
1212 "devDependencies" : {
13- "@riotjs/compiler" : " 4.7.0 " ,
13+ "@riotjs/compiler" : " 4.8.2 " ,
1414 "@riotjs/webpack-loader" : " 4.0.3" ,
15- "webpack" : " 4.42.0 " ,
15+ "webpack" : " 4.42.1 " ,
1616 "webpack-cli" : " 3.3.11"
1717 },
1818 "dependencies" : {
19- "riot" : " 4.11 .0"
19+ "riot" : " 4.12 .0"
2020 }
2121}
Original file line number Diff line number Diff line change 3939 </div >
4040 </div >
4141 </div >
42- <table class =' table table-hover table-striped test-data' onclick ={ handleClick } >
42+ <table class =' table table-hover table-striped test-data' >
4343 <tbody >
4444 <tr each ={ row in state .rows } class ={ rowClass (row ) }>
4545 <td class =' col-md-1' >{ row .id }</td >
4646 <td class =' col-md-4' >
47- <a data-action = " select " data-id ={ row .id }>{ row .label }</a >
47+ <a onclick ={() => select( row.id) }>{ row .label }</a >
4848 </td >
4949 <td class =' col-md-1' >
50- <a ><span data-action = " remove " data-id ={ row .id } class =' glyphicon glyphicon-remove' aria-hidden =' true' ></span ></a >
50+ <a ><span onclick ={() => remove( row.id) } class='glyphicon glyphicon-remove' aria-hidden='true'></span ></a >
5151 </td >
5252 <td class =' col-md-6' ></td >
5353 </tr >
6464 selected: this .store .selected
6565 }
6666 },
67- handleClick (event ) {
68- const { action , id } = event .target .dataset
69-
70- if (action && id) {
71- this [action](Number (id))
72- }
73- },
7467 rowClass (row ) {
7568 return row .id === this .state .selected ? ' danger' : ' '
7669 },
You can’t perform that action at this time.
0 commit comments