egroupware_official/api/js/etemplate/Et2TreeWidget/Tests/TreeTest.js
2023-09-14 17:36:28 +02:00

7 lines
304 B
JavaScript

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;
});