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

types: add datasource generics type in Table #3603

Merged
merged 1 commit into from
Oct 26, 2016
Merged

Conversation

infeng
Copy link
Contributor

@infeng infeng commented Oct 26, 2016

增加一个设置Table的datasource类型的泛型

@mention-bot
Copy link

@infeng, thanks for your PR! By analyzing the history of the files in this pull request, we identified @benjycui, @afc163 and @ddcat1115 to be potential reviewers.

@afc163 afc163 merged commit 90fbd4d into ant-design:master Oct 26, 2016
@hjin-me
Copy link

hjin-me commented Nov 15, 2016

给 Table 增加泛型之后,只能如下的方式来使用 Table 了吗?

interface dateSource {
}
class NewTable extends Table<dataSource> {
}
let data = []

render(<NewTable dataSource={data}></NewTable>)

@infeng
Copy link
Contributor Author

infeng commented Nov 15, 2016

@hjin-me 如果不定义dataSource的类型,可以直接这样

let data: any[] = [];
<Table
dataSource={data}
/>

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

Successfully merging this pull request may close these issues.

None yet

4 participants