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

Table component should support function or node as emptyText's value #8871

Closed
jihgao opened this issue Jan 8, 2018 · 1 comment
Closed
Assignees
Labels
help wanted The suggestion or request has been accepted, we need you to help us by sending a pull request.

Comments

@jihgao
Copy link

jihgao commented Jan 8, 2018

What problem does this feature solve?

It is requried to put a shortcut link besides emptyText to create a new record in a lot of scenarios. The table component in rc-table support this feature which is restricted to only support strings in ant-design. If you could add this feature, it will make the component more flexable.

What does the proposed API look like?

<Table emptyText={()=>{
   return 'no data';
}}
/>

<Table emptyText={()=>{
   return <div><span>No data</span><a href="">Create a new record</a></div>
}}
/>
@afc163
Copy link
Member

afc163 commented Jan 8, 2018

PR is welcome~

@afc163 afc163 added the help wanted The suggestion or request has been accepted, we need you to help us by sending a pull request. label Jan 8, 2018
@afc163 afc163 self-assigned this Jan 11, 2018
@afc163 afc163 closed this as completed in 63c6202 Jan 11, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted The suggestion or request has been accepted, we need you to help us by sending a pull request.
Projects
None yet
Development

No branches or pull requests

2 participants