@bindu-dashing/dam-solution-v2 5.8.46 → 5.8.47
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -57,7 +57,10 @@ function BreadCrumbList({ folder, parentFolderId, setParentFolderId, pickerFolde
|
|
|
57
57
|
const treeId = get(item, "_id");
|
|
58
58
|
const name = get(item, "name", "N/A");
|
|
59
59
|
const isLast = treeId === get(last(tree), "_id");
|
|
60
|
+
const isRoot = index === 0 || treeId === rootFolderId;
|
|
60
61
|
const handleClick = () => {
|
|
62
|
+
if (isRoot)
|
|
63
|
+
return; // Root should not be clickable
|
|
61
64
|
if (pickerFolderId && setParentFolderId && !isLast) {
|
|
62
65
|
setParentFolderId(treeId);
|
|
63
66
|
}
|
|
@@ -65,7 +68,7 @@ function BreadCrumbList({ folder, parentFolderId, setParentFolderId, pickerFolde
|
|
|
65
68
|
setSelectedKeys(treeId);
|
|
66
69
|
}
|
|
67
70
|
};
|
|
68
|
-
const currentItemRender = (_jsx(Breadcrumb.Item, { onClick: handleClick, className:
|
|
71
|
+
const currentItemRender = (_jsx(Breadcrumb.Item, { onClick: isRoot ? undefined : handleClick, className: `md-lib-h-auto ${isRoot ? "" : "md-lib-cursor-pointer"}`, children: _jsx(Tooltip, { title: name, children: _jsx("p", { className: "md-lib-max-w-28 md-lib-truncate md-lib-font-semibold md-lib-text-[22px]", children: name }) }) }, treeId));
|
|
69
72
|
if (globalSearch) {
|
|
70
73
|
if (isLast || index == 0) {
|
|
71
74
|
return currentItemRender;
|