diff --git a/packages/components/input/src/Input.stories.tsx b/packages/components/input/src/Input.stories.tsx
index 1bbe3bd8c..c5a8c8a6f 100644
--- a/packages/components/input/src/Input.stories.tsx
+++ b/packages/components/input/src/Input.stories.tsx
@@ -437,7 +437,9 @@ export const FieldInvalid: StoryFn = _args => {
Title
-
+
+
+
The URL is invalid
diff --git a/packages/components/input/src/InputGroup.tsx b/packages/components/input/src/InputGroup.tsx
index 9fd01281d..7bae0ff19 100644
--- a/packages/components/input/src/InputGroup.tsx
+++ b/packages/components/input/src/InputGroup.tsx
@@ -58,7 +58,6 @@ export const InputGroup = forwardRef(null!)
const onClearRef = useRef(onClear)
const ref = useMergeRefs(input?.ref, inputRef)
@@ -67,19 +66,27 @@ export const InputGroup = forwardRef
+ : findElement('TrailingIcon')
const trailingAddon = findElement('TrailingAddon')
- const stateIndicator = findElement('StateIndicator') ||
- const trailingIcon = state ? stateIndicator : findElement('TrailingIcon')
+
+ // Acknowledge which subComponents are used in the compound context
const hasLeadingAddon = !!leadingAddon
const hasTrailingAddon = !!trailingAddon
const hasLeadingIcon = !!leadingIcon
const hasTrailingIcon = !!trailingIcon || !!state
- const disabled = field.disabled || !!disabledProp
- const readOnly = field.readOnly || !!readOnlyProp
const hasClearButton = !!value && !!clearButton && !disabled && !readOnly
const handleChange: ChangeEventHandler = event => {
@@ -102,9 +109,9 @@ export const InputGroup = forwardRef {
return {
- state: stateProp,
- disabled: !!disabledProp,
- readOnly: !!readOnlyProp,
+ state,
+ disabled,
+ readOnly,
hasLeadingIcon,
hasTrailingIcon,
hasLeadingAddon,
@@ -113,9 +120,9 @@ export const InputGroup = forwardRef