File tree Expand file tree Collapse file tree 1 file changed +1
-18
lines changed
packages/core/src/SelectCascader Expand file tree Collapse file tree 1 file changed +1
-18
lines changed Original file line number Diff line number Diff line change @@ -47,7 +47,7 @@ export default class SelectCascader extends Component<SelectCascaderProps, Istat
4747 maskClosable : true ,
4848 } ;
4949 state = {
50- value : this . getValue ( this . props . data , this . props . defaultValue || this . props . value ) ,
50+ value : new Array < SelectCascaderOneValue > ( ) ,
5151 } ;
5252
5353 static getDerivedStateFromProps ( props : SelectCascaderProps , state : Istate ) {
@@ -110,23 +110,6 @@ export default class SelectCascader extends Component<SelectCascaderProps, Istat
110110 }
111111 } ;
112112
113- getValue ( d : ICascaderDataItem [ ] , val : SelectCascaderValue | undefined ) {
114- let data = d || this . props . data ;
115- let value = val || this . props . value || this . props . defaultValue ;
116- if ( ! value || ! value . length || value . indexOf ( undefined ) > - 1 ) {
117- value = [ ] ;
118- for ( let i = 0 ; i < this . props . cols ! ; i ++ ) {
119- if ( data && data . length ) {
120- value [ i ] = data [ 0 ] . value ;
121- if ( data [ 0 ] . children ) {
122- data = data [ 0 ] . children ;
123- }
124- }
125- }
126- }
127- return value ;
128- }
129-
130113 getCols = ( ) => {
131114 const { data, cols, pickerItemStyle } = this . props ;
132115 const { value } = this . state ;
You can’t perform that action at this time.
0 commit comments