@@ -155,18 +155,18 @@ impl Component for Model {
155155 . iter ( )
156156 . map ( |row| {
157157 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( ) } />
163163 }
164164 } )
165165 . collect ( ) ;
166166
167167 html ! {
168168 <div class="container" >
169- <Jumbotron link=self . link. clone( ) />
169+ <Jumbotron link={ self . link. clone( ) } />
170170 <table class="table table-hover table-striped test-data" >
171171 <tbody id="tbody" >
172172 { rows }
@@ -213,22 +213,22 @@ impl Component for Jumbotron {
213213 <div class="col-md-6" >
214214 <div class="row" >
215215 <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>
217217 </div>
218218 <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>
220220 </div>
221221 <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>
223223 </div>
224224 <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>
226226 </div>
227227 <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>
229229 </div>
230230 <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>
232232 </div>
233233 </div>
234234 </div>
@@ -293,13 +293,13 @@ impl Component for Row {
293293
294294 fn view ( & self ) -> Html {
295295 html ! {
296- <tr class=if self . props. selected { "danger" } else { "" } >
296+ <tr class={ if self . props. selected { Some ( "danger" ) } else { None } } >
297297 <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( ) } >
299299 <a class="lbl" >{ self . props. data. label. clone( ) } </a>
300300 </td>
301301 <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( ) } >
303303 <span class="glyphicon glyphicon-remove remove" aria-hidden="true" ></span>
304304 </a>
305305 </td>
0 commit comments