From 8c9f66dda5edc17628f0a690b1f653b0a126fff3 Mon Sep 17 00:00:00 2001 From: PelayoFelgueroso Date: Mon, 10 Nov 2025 15:12:55 +0100 Subject: [PATCH] Add TextInput tooltip conditional when disabled --- packages/lib/src/text-input/TextInput.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/lib/src/text-input/TextInput.tsx b/packages/lib/src/text-input/TextInput.tsx index 3e3b31fb8..ba7c26be0 100644 --- a/packages/lib/src/text-input/TextInput.tsx +++ b/packages/lib/src/text-input/TextInput.tsx @@ -554,7 +554,7 @@ const DxcTextInput = forwardRef( icon="close" onClick={handleClearActionOnClick} tabIndex={tabIndex} - title={translatedLabels.textInput.clearFieldActionTitle} + title={!disabled ? translatedLabels.textInput.clearFieldActionTitle : undefined} /> )} {numberInputContext?.typeNumber === "number" && numberInputContext?.showControls && ( @@ -566,7 +566,7 @@ const DxcTextInput = forwardRef( onClick={!readOnly ? handleDecrementActionOnClick : undefined} ref={actionRef} tabIndex={tabIndex} - title={translatedLabels.numberInput.decrementValueTitle} + title={!disabled ? translatedLabels.numberInput.decrementValueTitle : undefined} /> ( onClick={!readOnly ? handleIncrementActionOnClick : undefined} ref={actionRef} tabIndex={tabIndex} - title={translatedLabels.numberInput.incrementValueTitle} + title={!disabled ? translatedLabels.numberInput.incrementValueTitle : undefined} /> )} @@ -587,7 +587,7 @@ const DxcTextInput = forwardRef( onClick={!readOnly ? action.onClick : undefined} ref={actionRef} tabIndex={tabIndex} - title={action.title ?? ""} + title={!disabled ? (action.title ?? undefined) : undefined} /> )}