Skip to content

Commit 48395cc

Browse files
committed
Merge branch 'Mil4n0r/tree_navigation' of github.com:dxc-technology/halstack-react into Mil4n0r/tree_navigation
2 parents eb921ca + 98ca001 commit 48395cc

File tree

4 files changed

+16
-15
lines changed

4 files changed

+16
-15
lines changed

apps/website/screens/components/breadcrumbs/code/examples/basicUsage.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@ const code = `() => {
77
href: "/components/select",
88
},
99
{
10-
label: "Specifications",
11-
href: "/components/select/specifications",
10+
label: "Code",
11+
href: "/components/select/code",
1212
},
1313
{
14-
label: "Design Tokens",
15-
href: "/components/select/specifications/#design-tokens",
14+
label: "Examples",
15+
href: "/components/select/code/#examples",
1616
},
1717
{
18-
label: "Color",
18+
label: "Uncontrolled",
1919
}
2020
];
2121

apps/website/screens/components/breadcrumbs/code/examples/nextJS.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,15 @@ const code = `() => {
1313
href: "/components/select",
1414
},
1515
{
16-
label: "Specifications",
17-
href: "/components/select/specifications",
16+
label: "Code",
17+
href: "/components/select/code",
1818
},
1919
{
20-
label: "Design Tokens",
21-
href: "/components/select/specifications/#design-tokens",
20+
label: "Examples",
21+
href: "/components/select/code/#examples",
2222
},
2323
{
24-
label: "Color",
24+
label: "Uncontrolled",
2525
}
2626
];
2727

packages/lib/src/breadcrumbs/Item.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,9 @@ const Item = ({ isCurrentPage = false, href, label, onClick }: ItemPropsType) =>
4848
const currentItemRef = useRef<HTMLSpanElement | null>(null);
4949

5050
const handleOnClick = (event: MouseEvent<HTMLAnchorElement>) => {
51+
if (typeof onClick !== "function") return;
5152
event.preventDefault();
52-
if (href) onClick?.(href);
53+
if (href) onClick(href);
5354
};
5455

5556
const handleOnMouseEnter = (event: MouseEvent<HTMLAnchorElement>) => {

packages/lib/src/text-input/TextInput.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -554,7 +554,7 @@ const DxcTextInput = forwardRef<RefType, TextInputPropsType>(
554554
icon="close"
555555
onClick={handleClearActionOnClick}
556556
tabIndex={tabIndex}
557-
title={translatedLabels.textInput.clearFieldActionTitle}
557+
title={!disabled ? translatedLabels.textInput.clearFieldActionTitle : undefined}
558558
/>
559559
)}
560560
{numberInputContext?.typeNumber === "number" && numberInputContext?.showControls && (
@@ -566,7 +566,7 @@ const DxcTextInput = forwardRef<RefType, TextInputPropsType>(
566566
onClick={!readOnly ? handleDecrementActionOnClick : undefined}
567567
ref={actionRef}
568568
tabIndex={tabIndex}
569-
title={translatedLabels.numberInput.decrementValueTitle}
569+
title={!disabled ? translatedLabels.numberInput.decrementValueTitle : undefined}
570570
/>
571571
<DxcActionIcon
572572
size="xsmall"
@@ -575,7 +575,7 @@ const DxcTextInput = forwardRef<RefType, TextInputPropsType>(
575575
onClick={!readOnly ? handleIncrementActionOnClick : undefined}
576576
ref={actionRef}
577577
tabIndex={tabIndex}
578-
title={translatedLabels.numberInput.incrementValueTitle}
578+
title={!disabled ? translatedLabels.numberInput.incrementValueTitle : undefined}
579579
/>
580580
</>
581581
)}
@@ -587,7 +587,7 @@ const DxcTextInput = forwardRef<RefType, TextInputPropsType>(
587587
onClick={!readOnly ? action.onClick : undefined}
588588
ref={actionRef}
589589
tabIndex={tabIndex}
590-
title={action.title ?? ""}
590+
title={!disabled ? (action.title ?? undefined) : undefined}
591591
/>
592592
)}
593593
</DxcFlex>

0 commit comments

Comments
 (0)