egroupware_official/api/js/etemplate/Et2TreeWidget/Tests/TreeTest.js

7 lines
304 B
JavaScript
Raw Normal View History

2023-08-23 09:34:00 +02:00
const selectionMode = document.querySelector('#selection-mode');
const tree = document.querySelector('.tree-selectable');
selectionMode.addEventListener('sl-change', () => {
tree.querySelectorAll('sl-tree-item').forEach(item => (item.selected = false));
tree.selection = selectionMode.value;
});