Commit 75a07d3 1 parent 0299695 commit 75a07d3 Copy full SHA for 75a07d3
File tree 5 files changed +37
-5
lines changed
5 files changed +37
-5
lines changed Original file line number Diff line number Diff line change @@ -389,6 +389,9 @@ class TableFunctionDemo extends React.Component {
389
389
< DemoGroup label = "Selected & Expanded" >
390
390
< Table rowSelection = { rowSelection } expandedRowRender = { ( record ) => record . price } dataSource = { listDataSource } hasHeader = { hasHeader } isZebra = { isZebra } > { cols } </ Table >
391
391
</ DemoGroup >
392
+ < DemoGroup label = "Tree" >
393
+ < Table rowSelection = { rowSelection } dataSource = { listDataSource } hasHeader = { hasHeader } isZebra = { isZebra } isTree > { cols . slice ( 1 ) } </ Table >
394
+ </ DemoGroup >
392
395
< DemoGroup label = "No Data" >
393
396
< Table rowSelection = { rowSelection } dataSource = { [ ] } hasHeader = { hasHeader } isZebra = { isZebra } > { cols } </ Table >
394
397
</ DemoGroup >
Original file line number Diff line number Diff line change @@ -2,7 +2,6 @@ import ConfigProvider from '../config-provider';
2
2
import Balloon from './balloon' ;
3
3
import Tooltip from './tooltip' ;
4
4
import Inner from './inner' ;
5
- import { log } from '../util' ;
6
5
7
6
Balloon . Tooltip = ConfigProvider . config ( Tooltip , {
8
7
transform : /* istanbul ignore next */ ( props , deprecated ) => {
Original file line number Diff line number Diff line change @@ -111,9 +111,17 @@ export default function expanded(BaseComponent) {
111
111
{ primaryKey } = this . props ,
112
112
hasExpanded = openRowKeys . indexOf ( record [ primaryKey ] ) > - 1 ,
113
113
switchNode = hasExpanded ? (
114
- < Icon type = "minus" size = "xs" />
114
+ < Icon
115
+ type = "minus"
116
+ size = "xs"
117
+ className = { `${ prefix } table-expand-unfold` }
118
+ />
115
119
) : (
116
- < Icon type = "add" size = "xs" />
120
+ < Icon
121
+ type = "add"
122
+ size = "xs"
123
+ className = { `${ prefix } table-expand-fold` }
124
+ />
117
125
) ,
118
126
attrs = getExpandedColProps ( record , index ) || { } ;
119
127
const cls = classnames ( {
Original file line number Diff line number Diff line change 21
21
}
22
22
23
23
#{$table-prefix } -prerow #{$table-prefix } -cell-wrapper {
24
- padding : $s-3 $s-4 ;
24
+ padding : $s-2 $s-2 ;
25
25
}
26
26
}
27
27
103
103
padding : $s-3 $s-4 ;
104
104
}
105
105
}
106
+
106
107
#{$table-prefix } -expanded ,
107
108
#{$table-prefix } -selection {
108
109
#{$table-prefix } -cell-wrapper {
396
397
& .disabled {
397
398
color : $table-expanded-ctrl-disabled-color ;
398
399
}
399
- .#{$css-prefix } icon {
400
+
401
+ .#{$css-prefix } table-expand-unfold {
400
402
@include icon-size ($table-expanded-icon-size );
403
+ & ::before {
404
+ content : $table-expand-unfold-icon-content ;
405
+ }
406
+ }
407
+
408
+ .#{$css-prefix } table-expand-fold {
409
+ @include icon-size ($table-expanded-icon-size );
410
+ & ::before {
411
+ content : $table-expand-fold-icon-content ;
412
+ }
401
413
}
402
414
}
403
415
Original file line number Diff line number Diff line change @@ -150,3 +150,13 @@ $table-tree-fold-icon-content: $icon-content-arrow-right !default;
150
150
/// @namespace statement/normal
151
151
/// @type icon
152
152
$table-tree-unfold-icon-content : $icon-content-arrow-down !default ;
153
+
154
+ /// expand fold icon
155
+ /// @namespace statement/normal
156
+ /// @type icon
157
+ $table-expand-fold-icon-content : $icon-content-add !default ;
158
+
159
+ /// expand unfold icon
160
+ /// @namespace statement/normal
161
+ /// @type icon
162
+ $table-expand-unfold-icon-content : $icon-content-minus !default ;
You can’t perform that action at this time.
0 commit comments