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
kunlongxu opened this issue Dec 20, 2017 · 2 comments
Closed

Comments

@kunlongxu
Copy link
Contributor

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 commented Dec 20, 2017

@linmodev Could you send a PR?

@kunlongxu
Copy link
Contributor Author

@yesmeck ok

kunlongxu pushed a commit to kunlongxu/ant-design that referenced this issue Dec 20, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants