Treeview OnSelect link calling now respects turbo-frames again

This commit is contained in:
Jan Böhmer 2022-08-13 01:15:54 +02:00
parent f21cd55b2e
commit 145aca485c

View file

@ -67,7 +67,7 @@ export default class extends Controller {
showTags: this._showTags,
data: data,
showIcon: false,
onNodeSelected: function (event) {
onNodeSelected: (event) => {
const node = event.detail.node;
if (node.href) {
@ -75,7 +75,7 @@ export default class extends Controller {
let a = document.createElement('a');
a.setAttribute('href', node.href);
a.innerHTML = "";
document.body.appendChild(a);
this.element.appendChild(a);
a.click();
a.remove();
}