You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Function to return the label out of the item value prop when value is custom shaped.
32
+
* Custom function for the item label (e.g (value) => customLabel)
36
33
*/
37
34
getItemLabel: PropTypes.func,
38
35
/**
39
-
* Function to return the value out of the item value prop when value is custom shaped.
36
+
* DEPRECATE: Function to return the value out of the item value prop when value is custom shaped.
40
37
*/
41
38
getItemValue: PropTypes.func,
42
39
/**
@@ -69,19 +66,15 @@ class PickerItem extends BaseComponent {
69
66
onSelectedLayout: PropTypes.func
70
67
};
71
68
72
-
/* eslint-disable */
73
-
/* constructor(props) {
69
+
70
+
constructor(props){
74
71
super(props);
75
72
76
-
if (props.label) {
77
-
console.warn('PickerItem \'label\' prop will be deprecated soon. please include label in \'value\' prop. (refer docs)'); //eslint-disable-line
78
-
}
79
-
80
-
if (!_.isObject(props.value)) {
81
-
console.warn('PickerItem \'value\' prop type has changed to object, please use it with the following format: {value: ..., label: ...} or use getItemValue & getItemLabel props'); //eslint-disable-line
73
+
if(_.isPlainObject(props.value)){
74
+
console.warn('UILib Picker.Item will stop supporting passing object as value & label (e.g {value, label}) in the next major version. Please pass separate label and value props');
0 commit comments