-
-
Notifications
You must be signed in to change notification settings - Fork 493
Add Form component FormData generic typing #426
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -69,7 +69,9 @@ export interface RenderableProps<T> { | |
| render?: (props: T) => React.ReactNode | ||
| } | ||
|
|
||
| export interface FormProps extends Config, RenderableProps<FormRenderProps> { | ||
| export interface FormProps<FormData = object> | ||
| extends Config<FormData>, | ||
| RenderableProps<FormRenderProps> { | ||
| subscription?: FormSubscription | ||
| decorators?: Decorator[] | ||
| initialValuesEqual?: (a?: object, b?: object) => boolean | ||
|
|
@@ -94,7 +96,9 @@ export interface FormSpyProps extends RenderableProps<FormSpyRenderProps> { | |
| } | ||
|
|
||
| export var Field: React.ComponentType<FieldProps> | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It would be nice for |
||
| export var Form: React.ComponentType<FormProps> | ||
| export class Form<FormData = object> extends React.Component< | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
It would suggest I can create instances a la There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I've been doing this if it helps. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| FormProps<FormData> | ||
| > {} | ||
| export var FormSpy: React.ComponentType<FormSpyProps> | ||
| export var version: string | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't these also be
FormData?