mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-11 20:40:20 +00:00
Merge pull request #32854 from sargant/fix-redux-form-field-definition
[redux-form] - Fix for failing Field definition in TypeScript 3.2+
This commit is contained in:
Vendored
+1
-1
@@ -61,7 +61,7 @@ export type GenericFieldHTMLAttributes =
|
||||
SelectHTMLAttributes<HTMLSelectElement> |
|
||||
TextareaHTMLAttributes<HTMLTextAreaElement>;
|
||||
|
||||
export class Field<P = GenericFieldHTMLAttributes | BaseFieldProps> extends Component<BaseFieldProps<P> & P> {
|
||||
export class Field<P extends GenericFieldHTMLAttributes | BaseFieldProps = GenericFieldHTMLAttributes | BaseFieldProps> extends Component<P> {
|
||||
dirty: boolean;
|
||||
name: string;
|
||||
pristine: boolean;
|
||||
|
||||
@@ -290,6 +290,12 @@ const Test = reduxForm<TestFormData>({
|
||||
component="select"
|
||||
/>
|
||||
|
||||
<Field
|
||||
name="field4"
|
||||
component={ MyField }
|
||||
foo="bar"
|
||||
/>
|
||||
|
||||
<FieldCustom
|
||||
name="field4"
|
||||
component={ MyField }
|
||||
|
||||
Reference in New Issue
Block a user