Skip to content

Commit

Permalink
docs(Table): add getExpandedColProps (alibaba-fusion#2858)
Browse files Browse the repository at this point in the history
  • Loading branch information
youluna authored Apr 9, 2021
1 parent 5749eff commit 68f1dfd
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion docs/table/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ ReactDOM.render(
| rowExpandable | 设置行是否可展开,设置 false 为不可展开<br><br>**签名**:<br>Function(record: Object, index: Number) => Boolean<br>**参数**:<br>_record_: {Object} 该行所对应的数据<br>_index_: {Number} 该行所对应的序列<br>**返回值**:<br>{Boolean} 是否可展开<br> | Function | - | |
| expandedRowIndent | 额外渲染行的缩进 | Array | - | |
| hasExpandedRowCtrl | 是否显示点击展开额外渲染行的+号按钮 | Boolean | - | |
| getExpandedColProps | 设置额外渲染行的属性<br><br>**签名**:<br>Function() => void | Function | - | |
| getExpandedColProps | 设置额外渲染行的属性<br><br>**签名**:<br>Function(record: Object, index: Number) => Object<br>**参数**:<br>_record_: {Object} 该行所对应的数据<br>_index_: {Number} 该行所对应的序列<br>**返回值**:<br>{Object} 额外渲染行的属性<br> | Function | - | |
| openRowKeys | 默认情况下展开的 Expand行 或者 Tree行 , 传入此属性为受控状态,一般配合 onRowOpen 使用 | Array | - | |
| onRowOpen | 在 Expand行 或者 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 | - | |
| fixedHeader | 表头是否固定,该属性配合maxBodyHeight使用,当内容区域的高度超过maxBodyHeight的时候,在内容区域会出现滚动条 | Boolean | - | |
Expand Down
7 changes: 1 addition & 6 deletions src/input/input.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -347,12 +347,7 @@ export default class Input extends Base {
);

const inputWrap = (
<span
{...dataProps}
dir={rtl ? 'rtl' : undefined}
className={cls}
style={hasAddon ? undefined : style}
>
<span {...dataProps} dir={rtl ? 'rtl' : undefined} className={cls} style={hasAddon ? undefined : style}>
{this.renderLabel()}
{this.renderInner(innerBefore, innerBeforeCls)}
{inputRender(inputEl)}
Expand Down
3 changes: 3 additions & 0 deletions src/table/base.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,9 @@ class Table extends React.Component {
hasExpandedRowCtrl: PropTypes.bool,
/**
* 设置额外渲染行的属性
* @param {Object} record 该行所对应的数据
* @param {Number} index 该行所对应的序列
* @returns {Object} 额外渲染行的属性
*/
getExpandedColProps: PropTypes.func,
/**
Expand Down

0 comments on commit 68f1dfd

Please sign in to comment.