mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-21 01:25:55 +02:00
Load the link again when clicking a already selected treeview node, instead of just unselecting it
This fixes the somehow unintuitive behavior described in issue #458
This commit is contained in:
parent
8018e8687b
commit
a161e3a520
2 changed files with 5 additions and 4 deletions
|
@ -132,7 +132,8 @@ export default class extends Controller {
|
|||
|
||||
//We only compare the pathname, because the hash and parameters should not matter
|
||||
if(window.location.pathname !== desired.pathname) {
|
||||
node.setSelected(false);
|
||||
//The ignore parameter is important here, otherwise the node will not be unselected
|
||||
node.setSelected(false, {silent: true, ignorePreventUnselect: true});
|
||||
|
||||
//Unregister the watcher
|
||||
document.removeEventListener('turbo:visit', unselectNode);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue