mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-21 09:35:49 +02:00
Use Turbo.visit for tree clicks
This now seems to work properly and respecting frames
This commit is contained in:
parent
cd1602fbc4
commit
6d1d2cd731
1 changed files with 1 additions and 8 deletions
|
@ -70,14 +70,7 @@ export default class extends Controller {
|
||||||
onNodeSelected: (event) => {
|
onNodeSelected: (event) => {
|
||||||
const node = event.detail.node;
|
const node = event.detail.node;
|
||||||
if (node.href) {
|
if (node.href) {
|
||||||
|
window.Turbo.visit(node.href, {action: "advance"});
|
||||||
//Simulate a click so we just change the inner frame
|
|
||||||
let a = document.createElement('a');
|
|
||||||
a.setAttribute('href', node.href);
|
|
||||||
a.innerHTML = "";
|
|
||||||
this.element.appendChild(a);
|
|
||||||
a.click();
|
|
||||||
a.remove();
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
//onNodeContextmenu: contextmenu_handler,
|
//onNodeContextmenu: contextmenu_handler,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue