-
-
Notifications
You must be signed in to change notification settings - Fork 589
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
Elements overriding #171
Elements overriding #171
Conversation
715ff05
to
4c8d472
Compare
Yeah, aligned cell can be implemented through custom component: const CenterCell = (props) => <th {...props} style={{ textAlign: 'center' }} />;
<Table components={{ body: { cell: CenterCell } }} /> |
column.align will be easier to use. |
4c8d472
to
ac3c4de
Compare
After introducing |
|
ac3c4de
to
e7458ae
Compare
补充一下
|
@yesmeck Is there a way to just wrap the |
do components work in virtual table ? I have been trying to add a custom row component but it seems it is getting ignored when virtual table is enabled. |
This PR addresses many long living issues.
Added
components
to allow overriding default table elements.Added
onRow
,onHeaderRow
,column[onCell]
andcolumn[onHeaderCell]
to allow overriding row and cell props.Integrate with react-dnd
See https://yesmeck.github.io/table/examples/react-dnd.html
Close ant-design/ant-design#4639, #83
Integrate with styled-components
See https://yesmeck.github.io/table/examples/styled-components.html.
Ability to add any event listener to the table element with
onRow
andonCell
Don't need add tons of
onRowXXX
props.Close ant-design/ant-design#7096, #127, #141, #117, #149
Ability to optimize table row with sCU
Related ant-design/ant-design#2884
Others
Close ant-design/ant-design#5776, #139