提交
This commit is contained in:
1 parent
4a00f21bfb
commit
edf88dc016
1503 files changed
+329728
-41987
No files matched your search
@@ -16,11 +16,9 @@ export function buildTreePathLabelFromFlat(
|
||||
const separator =
|
||||
typeof separatorOrOpts === 'string'
|
||||
? separatorOrOpts
|
||||
: separatorOrOpts?.separator ?? DEFAULT_TREE_PATH_SEPARATOR
|
||||
: (separatorOrOpts?.separator ?? DEFAULT_TREE_PATH_SEPARATOR)
|
||||
const nameKey =
|
||||
typeof separatorOrOpts === 'string'
|
||||
? 'name'
|
||||
: separatorOrOpts?.nameKey ?? 'name'
|
||||
typeof separatorOrOpts === 'string' ? 'name' : (separatorOrOpts?.nameKey ?? 'name')
|
||||
const cid = String(nodeId ?? '').trim()
|
||||
if (!cid) return ''
|
||||
const byId = new Map<string, TreePathFlatNode>()
|
||||
@@ -81,11 +79,10 @@ export function resolveTreePathDisplay(
|
||||
emptyPlaceholder = '—',
|
||||
nameKey?: string
|
||||
): string {
|
||||
const path = buildTreePathLabelFromFlat(
|
||||
String(nodeId ?? '').trim() || undefined,
|
||||
flatList,
|
||||
{ separator, nameKey }
|
||||
)
|
||||
const path = buildTreePathLabelFromFlat(String(nodeId ?? '').trim() || undefined, flatList, {
|
||||
separator,
|
||||
nameKey
|
||||
})
|
||||
if (path) return path
|
||||
const fb = String(fallbackName ?? '').trim()
|
||||
if (fb) return fb
|
||||
|
||||
Reference in new issue
Block a user