Skip to content

Commit 37bf2ef

Browse files
committed
Format Picker file
1 parent d588db4 commit 37bf2ef

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed

src/components/picker/index.js

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,13 @@ const PICKER_MODES = {
2222
MULTI: 'MULTI'
2323
};
2424
const ItemType = PropTypes.oneOfType([
25-
PropTypes.number,
25+
PropTypes.number,
2626
PropTypes.string,
2727
PropTypes.shape({
2828
value: PropTypes.any,
2929
label: PropTypes.string
30-
})]);
30+
})
31+
]);
3132

3233
/**
3334
* @description: Picker Component, support single or multiple selection, blurModel and nativePicker
@@ -260,7 +261,7 @@ class Picker extends Component {
260261
if (_.isFunction(getLabel) && !_.isUndefined(getLabel(value))) {
261262
return getLabel(value);
262263
}
263-
264+
264265
if (_.isArray(value)) {
265266
return this.getLabelsFromArray(value);
266267
}
@@ -274,7 +275,7 @@ class Picker extends Component {
274275
const selectedItem = _.find(items, {value});
275276

276277
return _.get(selectedItem, 'label');
277-
}
278+
};
278279

279280
getFilteredChildren = memoize((children, searchValue) => {
280281
const {getItemLabel: getItemLabelPicker} = this.props;
@@ -336,7 +337,11 @@ class Picker extends Component {
336337
_.invoke(this.props, 'onSearchChange', searchValue);
337338
};
338339

339-
onSelectedItemLayout = ({nativeEvent: {layout: {y}}}) => {
340+
onSelectedItemLayout = ({
341+
nativeEvent: {
342+
layout: {y}
343+
}
344+
}) => {
340345
this.setState({selectedItemPosition: y});
341346
};
342347

@@ -400,7 +405,7 @@ class Picker extends Component {
400405
listProps={listProps}
401406
onShow={onShow}
402407
>
403-
{this.children}
408+
{this.children}
404409
</PickerModal>
405410
</PickerContext.Provider>
406411
);

0 commit comments

Comments
 (0)