Skip to content

Commit eb5c8ee

Browse files
committed
Merge branch 'GianlucaGuarini-master'
2 parents e615b74 + e4362a8 commit eb5c8ee

File tree

4 files changed

+12
-26
lines changed

4 files changed

+12
-26
lines changed

frameworks/keyed/riot/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@
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
}

frameworks/keyed/riot/src/app.riot

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -39,15 +39,15 @@
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>
@@ -64,13 +64,6 @@
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
},

frameworks/non-keyed/riot/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@
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
}

frameworks/non-keyed/riot/src/app.riot

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -39,15 +39,15 @@
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>
@@ -64,13 +64,6 @@
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
},

0 commit comments

Comments
 (0)