diff --git a/packages/gestalt/src/TextField/InternalTextField.tsx b/packages/gestalt/src/TextField/InternalTextField.tsx index aba7758e16..3b47d56c1d 100644 --- a/packages/gestalt/src/TextField/InternalTextField.tsx +++ b/packages/gestalt/src/TextField/InternalTextField.tsx @@ -161,7 +161,7 @@ const InternalTextFieldWithForwardRef = forwardRef(func // When using both forwardRef and innerRefs, useimperativehandle() allows to externally set focus via the ref prop: textfieldRef.current.focus() // @ts-expect-error - TS2322 - Type 'HTMLDivElement | HTMLInputElement | null' is not assignable to type 'HTMLInputElement'. - useImperativeHandle(ref, () => innerRef.current); + useImperativeHandle(ref, () => (tags ? innerTagsRef.current : innerRef.current)); // ==== STATE ==== const [focused, setFocused] = useState(false);