Use pathstring in selectedLabel (if available)
This commit is contained in:
parent
a316c78e2e
commit
a322d556ba
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue