{
if (disabled) return;
clickNode(node);
}}"
on:keydown="{(e) => {
if (e.key === 'ArrowLeft' || e.key === 'ArrowRight' || e.key === 'Enter') {
e.stopPropagation();
}
if (e.key === 'ArrowLeft') {
const parentNode = findParentTreeNode(ref.parentNode);
if (parentNode) parentNode.focus();
}
if (e.key === 'Enter' || e.key === ' ') {
e.preventDefault();
if (disabled) return;
clickNode(node);
}
}}"
on:focus="{() => {
focusNode(node);
}}"
>
{text}