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
linmodev opened this Issue Dec 20, 2017 · 2 comments

Comments

Projects
None yet
2 participants
@linmodev
Contributor

linmodev 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

This comment has been minimized.

Member

yesmeck commented Dec 20, 2017

@linmodev Could you send a PR?

@linmodev

This comment has been minimized.

Contributor

linmodev commented Dec 20, 2017

linmodev pushed a commit to linmodev/ant-design that referenced this issue Dec 20, 2017

@valleykid valleykid closed this in b06ea24 Dec 22, 2017

lixiaoyang1992 added a commit to lixiaoyang1992/ant-design that referenced this issue Jan 3, 2018

Add React.SFC type for Form.create return value ant-design#8672 (ant-…
…design#8675)

* Add React.SFC type for Form.create return value

* Restore indented.Fixed ant-design#8672

* Commit for lint

* Commit for lint

lixiaoyang1992 added a commit to lixiaoyang1992/ant-design that referenced this issue Jan 3, 2018

Add React.SFC type for Form.create return value ant-design#8672 (ant-…
…design#8675)

* Add React.SFC type for Form.create return value

* Restore indented.Fixed ant-design#8672

* Commit for lint

* Commit for lint
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment