]> git.ardis.lu - ens2hex/commitdiff
Replace previous results in the table body
authorArdis Lu <ardisglu@gmail.com>
Sun, 21 Aug 2022 06:30:41 +0000 (23:30 -0700)
committerArdis Lu <ardisglu@gmail.com>
Sun, 21 Aug 2022 06:30:41 +0000 (23:30 -0700)
index.html

index d126cdb677c0904ce86a3d92aff5186e5b33c5fc..1764db0f3a64545474e54306485581f53cf01347 100644 (file)
@@ -74,7 +74,6 @@
               <th>Address</th>
             </tr>
           </thead>
-          <tbody></tbody>
         </table>
       </output>
     </form>
         body: JSON.stringify(batchPayload),
       }).then(r => r.json());
 
+      table.querySelector('tbody')?.remove(); // Clear previous rows, if any
+      const body = table.createTBody();
       for (const [index, response] of batchResponse.entries()) {
-        const row = table.insertRow();
+        const row = body.insertRow();
         const ens = row.insertCell();
         const address = row.insertCell();
 
This page took 0.043188 seconds and 4 git commands to generate.