dart - Insert Input Tag into td tags via templates -
I have a table and each row has an edit button. If that button is pressed then all TD tags should have a text input tag, which includes the price. So for every TD two templates will be very much. After pressing the button, the table should look like this: Since there are huge applause, the template in each TD is not an option. I currently have an alternate solution where the extended TD tag is used with polymer. You can try it With some backing code containing You can do this by using other types of backing data structures, and the information I create can be somewhat simpler than the map, but I think it It's like something you do. & lt; tr template ... & gt; will not work because TD tags will be ignored by the browser, because see the table around the TDS template. Have done a lot with the template and it did not work.
& lt; Table & gt; & Lt; TR & gt; & Lt; TD & gt; td11 & lt; / Td> & Lt; TD & gt; td12 & lt; / Td> & Lt; TD & gt; & Lt; Click on the button = "{{someFunc}}" /> & Lt; / TD & gt; & Lt; / TR & gt; & Lt; TR & gt; & Lt; TD & gt; td21 & lt; / Td> & Lt; TD & gt; td22 & lt; / Td> & Lt; TD & gt; & Lt; Click on the button = "{{someFunc}}" /> & Lt; / TD & gt; & Lt ;! - This button will be pressed - & gt; & Lt; / TR & gt; & Lt; / Table & gt;
& lt; Table & gt; & Lt; TR & gt; & Lt; TD & gt; td11 & lt; / Td> & Lt; TD & gt; td12 & lt; / Td> & Lt; TD & gt; & Lt; Click on the button = "{{someFunc}}" /> & Lt; / TD & gt; & Lt; / TR & gt; & Lt; TR & gt; & Lt; TD & gt; & Lt; Input type = "text" value = "td21" /> & Lt; / TD & gt; & Lt; TD & gt; & Lt; Input type = "text" value = "td22" /> & Lt; / TD & gt; & Lt; TD & gt; & Lt; Click on the button = "{{someFunc}}" /> & Lt; / TD & gt; & Lt ;! - This button will be pressed - & gt; & Lt; / TR & gt; & Lt; / Table & gt;
& lt; Table & gt; & Lt; TR & gt; & Lt; TD & gt; & Lt; Template if = "{{info ['line1'] ['active'] == incorrect}}" & gt; TD11 & lt; / Template & gt; & Lt; Template if = "{{info {'row1'] ['active'] == true}}" & gt; Input
map info = toObservable ({'row1': {'active': false}}); SomeFunc (event E) {if (info [e.target.id] ['active'] == wrong) {info [e.target.id] ['active'] = true; } And {info [e.target.id] ['active'] = false; }}
Comments
Post a Comment