Use pathstring in selectedLabel (if available)

This commit is contained in:
Oliver Walters 2026-06-29 14:07:49 +00:00
parent a316c78e2e
commit a322d556ba
1 changed files with 2 additions and 1 deletions

View File

@ -215,7 +215,8 @@ export function TreeField({
const selectedLabel = useMemo(() => {
if (selectValue == null) return '';
return nodeMap[selectValue]?.name ?? selectValue;
const node = nodeMap[selectValue];
return node?.pathstring ?? node?.name ?? selectValue;
}, [nodeMap, selectValue]);
const inputSearchValue = isDropdownOpen ? searchValue : selectedLabel;