Skip to content

Commit

Permalink
Add href attribute with a link to pg dump for each list element on /p…
Browse files Browse the repository at this point in the history
…ages/dump
  • Loading branch information
Stanislav (Stas) Katkov authored and simi committed Jan 2, 2025
1 parent 62f36db commit ca67fee
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions app/javascript/controllers/dump_controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,9 @@ export default class extends Controller {

appendItem(text, uri) {
const clone = this.templateTarget.content.cloneNode(true);
const a = clone.querySelector('a > span')
a.textContent = text;
const span = clone.querySelector("a > span");
const a = clone.querySelector("a");
span.textContent = text;
a.href = uri;
this.element.appendChild(clone)
}
Expand Down

0 comments on commit ca67fee

Please sign in to comment.