@topconsultnpm/sdkui-react-beta 6.9.56 → 6.9.57
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.
|
@@ -59,7 +59,7 @@ const TMTextBox = ({ autoFocus, maxLength, labelColor, precision, scale, showCle
|
|
|
59
59
|
}, [maxValue, currentValue, currentType]);
|
|
60
60
|
// Handle autofocus behavior on mount
|
|
61
61
|
useEffect(() => {
|
|
62
|
-
if (autoFocus && inputRef.current) {
|
|
62
|
+
if ((!disabled || !readOnly) && autoFocus && inputRef.current) {
|
|
63
63
|
inputRef.current.focus(); // Focus the input field
|
|
64
64
|
}
|
|
65
65
|
}, [autoFocus]); // This effect runs when the autoFocus prop changes
|