File tree Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -17,10 +17,13 @@ const PICKER_MODES = {
17
17
SINGLE : 'SINGLE' ,
18
18
MULTI : 'MULTI'
19
19
} ;
20
- const ItemType = PropTypes . shape ( {
21
- value : PropTypes . any ,
22
- label : PropTypes . string
23
- } ) ;
20
+ const ItemType = PropTypes . oneOfType ( [
21
+ PropTypes . number ,
22
+ PropTypes . string ,
23
+ PropTypes . shape ( {
24
+ value : PropTypes . any ,
25
+ label : PropTypes . string
26
+ } ) ] ) ;
24
27
25
28
/**
26
29
* @description : Picker Component, support single or multiple selection, blurModel and nativePicker
@@ -163,9 +166,7 @@ class Picker extends PureComponent {
163
166
// console.warn('UILib Picker: don\'t use object as value for native picker, use either string or a number');
164
167
// }
165
168
if ( _ . isPlainObject ( props . value ) ) {
166
- LogService . warn (
167
- 'UILib Picker will stop supporting passing object as value in the next major version. Please use either string or a number as value'
168
- ) ;
169
+ LogService . warn ( 'UILib Picker will stop supporting passing object as value in the next major version. Please use either string or a number as value' ) ;
169
170
}
170
171
}
171
172
You can’t perform that action at this time.
0 commit comments