Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to click a link-to table row using ember.js?

Tags:

ember.js

I've got what should be a working example - moving the link-to from the anchor to the table row itself

  <table class="table table-hover">
    <tbody>
    {{#each customer in controller}}
    {{#link-to 'customer' customer.id tagName="tr"}}
      <td>
        <a {{bind-attr href="view.href"}}>click</a>
      </td>
    {{/link-to}}
    {{/each}}
    </tbody>
  </table>

Using mobile safari when I browse this page and "click" a table row it highlights the "color" of the row (bootstrap table-hover styling) so I know it's seeing that I've touched the row ... yet it won't jump to the route (unless I click the link itself)

How can/should I do a clickable table row with ember's link-to?

also -I'm using fastclick on the site to reduce the 300 ms delay and I killed zoom

<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
like image 848
Toran Billups Avatar asked Sep 17 '14 03:09

Toran Billups


1 Answers

add the css

td a {
    display:block;
    width:100%;
}
like image 142
LanNguyen Avatar answered Sep 22 '22 03:09

LanNguyen