mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-24 19:19:57 +08:00
update onRow usage
This commit is contained in:
parent
3ed3a078e1
commit
875024cd1e
@ -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>
|
||||
|
@ -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
|
||||
};
|
||||
)}
|
||||
/>
|
||||
|
@ -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: () => {}, // 点击表头行
|
||||
};
|
||||
)}
|
||||
/>
|
||||
|
Loading…
Reference in New Issue
Block a user