title: EasyAdmin3: clickable table-row (link to EDIT-page)
body: <p>I don't like the &quot;edit&quot;-button at the end of each entity on the INDEX-Page (EasyAdmin 3 / symfony 5) and I would like to have the table-row clickable and it shall send me directly to the EDIT-page.</p>
  <p>I guess the solution must be using Javascript, so I started:</p>
  <h2>PHP-file</h2>
  <pre><code>class PersonCrudController extends AbstractCrudController {
     [...]
     
      public function configureFields(string $pageName): iterable {
          [...]
          yield TextField::new('fullName',  'Name')-&gt;onlyOnIndex()-&gt;setCssClass('js-row-action');
          [...]
      }
  
     [...]
  }
  </code></pre>
  <h2>javascript-file</h2>
  <pre><code>// call functions once page is loaded
  document.addEventListener(&quot;DOMContentLoaded&quot;, function() {
      makeTableRowClickable();
  });
  
  function makeTableRowClickable() {
      let elements = document.getElementsByClassName('js-row-action');
  
      for (let i = 0; i &lt; elements.length; i++) {
          let td = elements[i];
          let tr = td.parentNode;
  
          tr.addEventListener(&quot;click&quot;, function (e) {
              alert('click the row, Jack!');
          });
      }
  }
  </code></pre>
  <h2>open questions</h2>
  <ol>
  <li>How do I generate the URL of the EDIT-page?</li>
  <li>How can I set a data attribute with the URL into any (hidden) field so that I can use it in the javascript?</li>
  </ol>
  <p>Any ideas? Many thanks!</p>