Skip to content

Commit a54ef73

Browse files
authored
Merge pull request #2329 from dxc-technology/PelayoFelgueroso/tooltip-disabled-numberInput
Remove tootlip in TextInput when component is disabled
2 parents 70b0038 + 8c9f66d commit a54ef73

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

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)