@@ -155,18 +155,18 @@ impl Component for Model {
155
155
. iter ( )
156
156
. map ( |row| {
157
157
html ! {
158
- <Row key=row. id
159
- data=row. clone( )
160
- selected=self . selected_id == Some ( row. id)
161
- on_select=self . on_select. clone( )
162
- on_remove=self . on_remove. clone( ) />
158
+ <Row key={ row. id}
159
+ data={ row. clone( ) }
160
+ selected={ self . selected_id == Some ( row. id) }
161
+ on_select={ self . on_select. clone( ) }
162
+ on_remove={ self . on_remove. clone( ) } />
163
163
}
164
164
} )
165
165
. collect ( ) ;
166
166
167
167
html ! {
168
168
<div class="container" >
169
- <Jumbotron link=self . link. clone( ) />
169
+ <Jumbotron link={ self . link. clone( ) } />
170
170
<table class="table table-hover table-striped test-data" >
171
171
<tbody id="tbody" >
172
172
{ rows }
@@ -213,22 +213,22 @@ impl Component for Jumbotron {
213
213
<div class="col-md-6" >
214
214
<div class="row" >
215
215
<div class="col-sm-6 smallpad" >
216
- <button type ="button" id="run" class="btn btn-primary btn-block" onclick=self . link. callback( |_| Msg :: Run ( 1_000 ) ) >{ "Create 1,000 rows" } </button>
216
+ <button type ="button" id="run" class="btn btn-primary btn-block" onclick={ self . link. callback( |_| Msg :: Run ( 1_000 ) ) } >{ "Create 1,000 rows" } </button>
217
217
</div>
218
218
<div class="col-sm-6 smallpad" >
219
- <button type ="button" class="btn btn-primary btn-block" onclick=self . link. callback( |_| Msg :: Run ( 10_000 ) ) id="runlots" >{ "Create 10,000 rows" } </button>
219
+ <button type ="button" class="btn btn-primary btn-block" onclick={ self . link. callback( |_| Msg :: Run ( 10_000 ) ) } id="runlots" >{ "Create 10,000 rows" } </button>
220
220
</div>
221
221
<div class="col-sm-6 smallpad" >
222
- <button type ="button" class="btn btn-primary btn-block" onclick=self . link. callback( |_| Msg :: Add ( 1_000 ) ) id="add" >{ "Append 1,000 rows" } </button>
222
+ <button type ="button" class="btn btn-primary btn-block" onclick={ self . link. callback( |_| Msg :: Add ( 1_000 ) ) } id="add" >{ "Append 1,000 rows" } </button>
223
223
</div>
224
224
<div class="col-sm-6 smallpad" >
225
- <button type ="button" class="btn btn-primary btn-block" onclick=self . link. callback( |_| Msg :: Update ( 10 ) ) id="update" >{ "Update every 10th row" } </button>
225
+ <button type ="button" class="btn btn-primary btn-block" onclick={ self . link. callback( |_| Msg :: Update ( 10 ) ) } id="update" >{ "Update every 10th row" } </button>
226
226
</div>
227
227
<div class="col-sm-6 smallpad" >
228
- <button type ="button" class="btn btn-primary btn-block" onclick=self . link. callback( |_| Msg :: Clear ) id="clear" >{ "Clear" } </button>
228
+ <button type ="button" class="btn btn-primary btn-block" onclick={ self . link. callback( |_| Msg :: Clear ) } id="clear" >{ "Clear" } </button>
229
229
</div>
230
230
<div class="col-sm-6 smallpad" >
231
- <button type ="button" class="btn btn-primary btn-block" onclick=self . link. callback( |_| Msg :: Swap ) id="swaprows" >{ "Swap Rows" } </button>
231
+ <button type ="button" class="btn btn-primary btn-block" onclick={ self . link. callback( |_| Msg :: Swap ) } id="swaprows" >{ "Swap Rows" } </button>
232
232
</div>
233
233
</div>
234
234
</div>
@@ -293,13 +293,13 @@ impl Component for Row {
293
293
294
294
fn view ( & self ) -> Html {
295
295
html ! {
296
- <tr class=if self . props. selected { "danger" } else { "" } >
296
+ <tr class={ if self . props. selected { Some ( "danger" ) } else { None } } >
297
297
<td class="col-md-1" >{ self . props. data. id } </td>
298
- <td class="col-md-4" onclick=self . state. on_select. clone( ) >
298
+ <td class="col-md-4" onclick={ self . state. on_select. clone( ) } >
299
299
<a class="lbl" >{ self . props. data. label. clone( ) } </a>
300
300
</td>
301
301
<td class="col-md-1" >
302
- <a class="remove" onclick=self . state. on_remove. clone( ) >
302
+ <a class="remove" onclick={ self . state. on_remove. clone( ) } >
303
303
<span class="glyphicon glyphicon-remove remove" aria-hidden="true" ></span>
304
304
</a>
305
305
</td>
0 commit comments