{
e.stopPropagation(); // Avoid toggling the collapsible element
}}
on:contextmenu={(e) => {
if (e.ctrlKey) {
// Add to selection instead of opening context menu
e.preventDefault();
e.stopPropagation();
selected.update((value) => {
if (value.has(id)) {
value.delete(id);
} else {
value.add(id);
}
return value;
});
}
}}
>
{label}