forked from alibaba-fusion/next
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlist-header.jsx
44 lines (40 loc) · 1.01 KB
/
list-header.jsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
import React from 'react';
import PropTypes from 'prop-types';
/**
* Table.GroupHeader
* @order 2
**/
export default class ListHeader extends React.Component {
static propTypes = {
/**
* 行渲染的逻辑
*/
cell: PropTypes.oneOfType([
PropTypes.element,
PropTypes.node,
PropTypes.func,
]),
/**
* 是否在Children上面渲染selection
*/
hasChildrenSelection: PropTypes.bool,
/**
* 是否在GroupHeader上面渲染selection
*/
hasSelection: PropTypes.bool,
/**
* 当 dataSouce 里没有 children 时,是否使用内容作为数据
*/
useFirstLevelDataWhenNoChildren: PropTypes.bool,
};
static defaultProps = {
cell: () => '',
hasSelection: true,
hasChildrenSelection: false,
useFirstLevelDataWhenNoChildren: false,
};
static _typeMark = 'listHeader';
render() {
return null;
}
}