Skip to content

Commit b8f7d4e

Browse files
committed
test connectedform type fix
1 parent d85a2c8 commit b8f7d4e

2 files changed

Lines changed: 4 additions & 6 deletions

File tree

packages/gamut/src/ConnectedForm/ConnectedForm.tsx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,13 +84,12 @@ export interface ConnectedFormProps<Values extends {}>
8484

8585
/**
8686
* Explicit type for the ConnectedForm component so that declaration emission
87-
* preserves the generic (Values) for consumers. Without this, forwardRef
88-
* would be inferred as any and the .d.ts would lose onSubmit/onError types.
87+
* preserves the generic (Values) for consumers. Single-argument signature
88+
* matches React 18/19 createElement(type, props); ref is passed via props.ref.
8989
*/
9090
export interface ConnectedFormComponent {
9191
<Values extends FormValues<Values>>(
92-
props: ConnectedFormProps<Values>,
93-
ref: React.ForwardedRef<HTMLFormElement>
92+
props: ConnectedFormProps<Values> & React.RefAttributes<HTMLFormElement>
9493
): React.ReactElement;
9594
}
9695

packages/gamut/src/Form/SelectDropdown/types/internal.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@ export type InternalSelectProps = {
1717
* Ref type for programmatic focus management.
1818
* Used for managing focus on select input and remove all button.
1919
*/
20-
export type ProgramaticFocusRef =
21-
React.MutableRefObject<HTMLDivElement | null>;
20+
export type ProgramaticFocusRef = React.MutableRefObject<HTMLDivElement | null>;
2221

2322
/**
2423
* Context value for SelectDropdown internal state management.

0 commit comments

Comments
 (0)