update onRow usage

This commit is contained in:
afc163 2018-02-08 14:25:49 +08:00
parent 3ed3a078e1
commit 875024cd1e
3 changed files with 12 additions and 8 deletions

View File

@ -18,14 +18,14 @@ Buttons can be grouped by placing multiple `Button` components into a `Button.Gr
The `size` can be set to `large`, `small` or left unset resulting in a default size.
````jsx
import { Button, Icon } from 'antd';
import { Button, Icon, Tooltip } from 'antd';
const ButtonGroup = Button.Group;
ReactDOM.render(
<div>
<h4>Basic</h4>
<ButtonGroup>
<Button>Cancel</Button>
<Tooltip title="xxx"><Button disabled>Cancel</Button></Tooltip>
<Button>OK</Button>
</ButtonGroup>
<ButtonGroup>

View File

@ -79,7 +79,9 @@ const columns = [{
| onHeaderRow | Set props on per header row | Function(column, index) | - |
| onRow | Set props on per row | Function(record, index) | - |
#### onRow and onHeaderRow
#### onRow usage
Same as `onRow` `onHeaderRow` `onCell` `onHeaderCell`
```jsx
<Table
@ -92,7 +94,7 @@ const columns = [{
)}
onHeaderRow={(column) => {
return {
onClick: () => {}, // click column header
onClick: () => {}, // click header row
};
)}
/>

View File

@ -81,20 +81,22 @@ const columns = [{
| onRow | 设置行属性 | Function(record, index) | - |
#### onRow 和 onHeaderRow 用法
#### onRow 用法
适用于 `onRow` `onHeaderRow` `onCell` `onHeaderCell`
```jsx
<Table
onRow={(column) => {
return {
onClick: () => {}, // 点击
onMouseEnter: () => {}, // 鼠标移入
onClick: () => {}, // 点击
onMouseEnter: () => {}, // 鼠标移入
onXxxx...
};
)}
onHeaderRow={(column) => {
return {
onClick: () => {}, // 点击列头
onClick: () => {}, // 点击表头行
};
)}
/>