Skip to content

Commit

Permalink
docs(Table): remove useless api
Browse files Browse the repository at this point in the history
  • Loading branch information
youluna committed Feb 12, 2020
1 parent b14cbcd commit 3e039f3
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 19 deletions.
4 changes: 0 additions & 4 deletions docs/table/demo/expanded-complex.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,9 +130,6 @@ class App extends React.Component {
console.log('rowProps', record, index);
return {className: `next-myclass-${index}`};
}
onExpandedRowClick(record, index) {
console.log('onExpandedRowClick', record, index);
}
render() {
const renderTitle = (value, index, record) => {
return <div>{value}<span onClick={this.toggleExpand.bind(this, record)}>index:{index} +++++</span></div>;
Expand All @@ -153,7 +150,6 @@ class App extends React.Component {
hasExpandedRowCtrl={this.state.hasExpandedRowCtrl}
onRowOpen={this.onRowOpen.bind(this)}
rowProps={this.rowProps.bind(this)}
onExpandedRowClick={this.onExpandedRowClick.bind(this)}
>
<Table.Column title="Id" dataIndex="id" sortable/>
<Table.Column title="Title" dataIndex="title" cell={renderTitle}/>
Expand Down
1 change: 0 additions & 1 deletion docs/table/demo/expanded.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ class App extends React.Component {
onSort={this.onSort.bind(this)}
expandedRowRender={(record) => record.title}
onRowClick={() => console.log('rowClick')}
onExpandedRowClick={() => console.log('expandedRowClick')}
expandedRowIndent={this.state.expandedRowIndent}
>
<Table.Column title="Id" dataIndex="id" sortable/>
Expand Down
1 change: 0 additions & 1 deletion docs/table/index.en-us.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,6 @@ ReactDOM.render(
| hasExpandedRowCtrl | whether to show the + button that clicks to expand additional row | Boolean | - |
| getExpandedColProps | get properties of expanded row<br><br>**signatures**:<br>Function() => void | Function | - |
| onRowOpen | callback triggered when expand row<br><br>**signatures**:<br>Function(openRowKeys: Array, currentRowKey: String, expanded: Boolean, currentRecord: Object) => void<br>**params**:<br>_openRowKeys_: {Array} key of expanded row<br>_currentRowKey_: {String} key of current clicked row<br>_expanded_: {Boolean} whether is expanded<br>_currentRecord_: {Object} the data corresponding to the current clicked row | Function | - |
| onExpandedRowClick | callback triggered when click the expanded row<br><br>**signatures**:<br>Function(record: Object, index: Number, e: Event) => void<br>**params**:<br>_record_: {Object} the data corresponding to the row<br>_index_: {Number} the index corresponding to the row<br>_e_: {Event} event object | Function | - |
| fixedHeader | whether the table header is fixed, this property is used with maxBodyHeight. When the height of the content area exceeds maxBodyHeight, a scroll bar appears in the content area. | Boolean | - |
| maxBodyHeight | the height of the largest content area, when `fixedHeader` is `true`, scroll bars will appear above this height | Number/String | - |
| rowSelection | whether to enable selection mode <br><br>**properties**:<br>_getProps_: {Function} `Function(record, index)=>Object` get default attributes of selection<br>_onChange_: {Function} `Function(selectedRowKeys:Array, records:Array)` callback triggered when selection change, **Note:** where records only contains the data of the current dataSource, it is likely to be less than the length of the selectedRowKeys.<br>_onSelect_: {Function} `Function(selected:Boolean, record:Object, records:Array)` callback triggered when user select<br>_onSelectAll_: {Function} `Function(selected:Boolean, records:Array)` callback triggered when user select all<br>_selectedRowKeys_: {Array} if this property is set, the rowSelection is controlled, and the received value is the value of the primaryKey of the row's data.<br>_mode_: {String} the mode of selection, the optional value is `single`, `multiple`, the default is `multiple`<br>_columnProps_: {Function} `Function()=>Object` props of checkbox columns which inherit from `Table.Column`<br>_titleProps_: {Function} `Function()=>Object` props of checkbox columns header, works only in `multiple` mode <br>_titleAddons_: {Function} `Function()=>Node` element added to checkbox columns header, works in both `single` and `multiple` mode | Object | - |
Expand Down
1 change: 0 additions & 1 deletion docs/table/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,6 @@ ReactDOM.render(
| hasExpandedRowCtrl | 是否显示点击展开额外渲染行的+号按钮 | Boolean | - |
| getExpandedColProps | 设置额外渲染行的属性<br><br>**签名**:<br>Function() => void | Function | - |
| onRowOpen | 在额外渲染行或者Tree展开或者收起的时候触发的事件<br><br>**签名**:<br>Function(openRowKeys: Array, currentRowKey: String, expanded: Boolean, currentRecord: Object) => void<br>**参数**:<br>_openRowKeys_: {Array} 展开的渲染行的key<br>_currentRowKey_: {String} 当前点击的渲染行的key<br>_expanded_: {Boolean} 当前点击是展开还是收起<br>_currentRecord_: {Object} 当前点击额外渲染行的记录 | Function | - |
| onExpandedRowClick | 点击额外渲染行触发的事件<br><br>**签名**:<br>Function(record: Object, index: Number, e: Event) => void<br>**参数**:<br>_record_: {Object} 该行所对应的数据<br>_index_: {Number} 该行所对应的序列<br>_e_: {Event} DOM事件对象 | Function | - |
| fixedHeader | 表头是否固定,该属性配合maxBodyHeight使用,当内容区域的高度超过maxBodyHeight的时候,在内容区域会出现滚动条 | Boolean | - |
| maxBodyHeight | 最大内容区域的高度,在`fixedHeader``true`的时候,超过这个高度会出现滚动条 | Number/String | - |
| rowSelection | 是否启用选择模式<br><br>**属性**:<br>_getProps_: {Function} `Function(record, index)=>Object` 获取selection的默认属性<br>_onChange_: {Function} `Function(selectedRowKeys:Array, records:Array)` 选择改变的时候触发的事件,**注意:** 其中records只会包含当前dataSource的数据,很可能会小于selectedRowKeys的长度。<br>_onSelect_: {Function} `Function(selected:Boolean, record:Object, records:Array)` 用户手动选择/取消选择某行的回调<br>_onSelectAll_: {Function} `Function(selected:Boolean, records:Array)` 用户手动选择/取消选择所有行的回调<br>_selectedRowKeys_: {Array} 设置了此属性,将rowSelection变为受控状态,接收值为该行数据的primaryKey的值<br>_mode_: {String} 选择selection的模式, 可选值为`single`, `multiple`,默认为`multiple`<br>_columnProps_: {Function} `Function()=>Object` 选择列 的props,例如锁列、对齐等,可使用`Table.Column` 的所有参数<br>_titleProps_: {Function} `Function()=>Object` 选择列 表头的props,仅在 `multiple` 模式下生效<br>_titleAddons_: {Function} `Function()=>Node` 选择列 表头添加的元素,在`single` `multiple` 下都生效 | Object | - |
Expand Down
6 changes: 0 additions & 6 deletions src/table/base.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -213,12 +213,6 @@ export default class Table extends React.Component {
* @param {Object} currentRecord 当前点击额外渲染行的记录
*/
onRowOpen: PropTypes.func,
/**
* 点击额外渲染行触发的事件
* @param {Object} record 该行所对应的数据
* @param {Number} index 该行所对应的序列
* @param {Event} e DOM事件对象
*/
onExpandedRowClick: PropTypes.func,
/**
* 表头是否固定,该属性配合maxBodyHeight使用,当内容区域的高度超过maxBodyHeight的时候,在内容区域会出现滚动条
Expand Down
6 changes: 0 additions & 6 deletions src/table/expanded.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,6 @@ export default function expanded(BaseComponent) {
* @param {Object} currentRecord 当前点击额外渲染行的记录
*/
onRowOpen: PropTypes.func,
/**
* 点击额外渲染行触发的事件
* @param {Object} record 该行所对应的数据
* @param {Number} index 该行所对应的序列
* @param {Event} e DOM事件对象
*/
onExpandedRowClick: PropTypes.func,
locale: PropTypes.object,
...BaseComponent.propTypes,
Expand Down

0 comments on commit 3e039f3

Please sign in to comment.