Skip to content

Commit 2d74d81

Browse files
authored
Pass forwarded ref in Picker (#1407)
1 parent 37bf2ef commit 2d74d81

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/components/picker/index.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -412,7 +412,8 @@ class Picker extends Component {
412412
};
413413

414414
render() {
415-
const {useNativePicker, renderPicker, customPickerProps, containerStyle, testID, modifiers} = this.props;
415+
const {useNativePicker, renderPicker, customPickerProps, containerStyle, testID, forwardedRef, modifiers} =
416+
this.props;
416417

417418
if (useNativePicker) {
418419
return <NativePicker {...this.props}/>;
@@ -437,6 +438,7 @@ class Picker extends Component {
437438

438439
return (
439440
<TextField
441+
ref={forwardedRef}
440442
{...textInputProps}
441443
containerStyle={[paddings, margins, positionStyle, containerStyle]}
442444
{...this.getAccessibilityInfo()}

0 commit comments

Comments
 (0)