Include icon

This commit is contained in:
Oliver Walters 2026-06-24 13:03:54 +00:00
parent bb2e095344
commit 65956ce7a4
1 changed files with 2 additions and 0 deletions

View File

@ -11,6 +11,7 @@ import { apiUrl } from '@lib/functions/Api';
import { cancelEvent } from '@lib/functions/Events';
import type { ApiFormFieldType } from '@lib/types/Forms';
import { useApi } from '../../../contexts/ApiContext';
import { ApiIcon } from '../../items/ApiIcon';
/**
* A form field that renders a hierarchical tree selector backed by a tree API endpoint.
@ -330,6 +331,7 @@ export function TreeField({
<IconChevronRight size={14} />
))}
</span>
{raw?.icon && <ApiIcon name={raw.icon} size={14} />}
<Text size='sm' fw={selected ? 600 : undefined}>
{raw?.name ?? String(node.label)}
</Text>