Skip to content
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

The return value of Form.create does not support SFC(StatelessComponent) #8672

Closed
bigjujube opened this issue Dec 20, 2017 · 2 comments
Closed

The return value of Form.create does not support SFC(StatelessComponent) #8672

bigjujube opened this issue Dec 20, 2017 · 2 comments

Comments

@bigjujube
Copy link
Contributor

@bigjujube bigjujube commented Dec 20, 2017

What problem does this feature solve?

You can pass SFC components directly in ts.

What does the proposed API look like?

export interface ComponentDecorator<TOwnProps> {
  <P extends FormComponentProps>(
    component: React.ComponentClass<P>
  ): React.ComponentClass<Omit<P, keyof FormComponentProps> & TOwnProps>;
}
export interface ComponentDecorator<TOwnProps> {
  <P extends FormComponentProps>(
    component: React.ComponentClass<P> | React.SFC<P>
  ): React.ComponentClass<Omit<P, keyof FormComponentProps> & TOwnProps>;
}
@yesmeck
Copy link
Member

@yesmeck yesmeck commented Dec 20, 2017

@linmodev Could you send a PR?

@bigjujube
Copy link
Contributor Author

@bigjujube bigjujube commented Dec 20, 2017

bigjujube pushed a commit to bigjujube/ant-design that referenced this issue Dec 20, 2017
@valleykid valleykid closed this in b06ea24 Dec 22, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants