From 9484a2608af1d60d8b51effe442b68df72c44b0b Mon Sep 17 00:00:00 2001 From: Matt Huggins Date: Sun, 5 Aug 2018 10:57:24 -0500 Subject: [PATCH] chore(select): forward refs to select dom element --- .../shared/components/Forms/Select/Select.js | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/src/renderer/shared/components/Forms/Select/Select.js b/src/renderer/shared/components/Forms/Select/Select.js index b8768c3b4..2d2044bd8 100644 --- a/src/renderer/shared/components/Forms/Select/Select.js +++ b/src/renderer/shared/components/Forms/Select/Select.js @@ -1,26 +1,34 @@ import React from 'react'; import classNames from 'classnames'; -import { string } from 'prop-types'; +import { string, func } from 'prop-types'; import styles from './Select.scss'; -export default class Select extends React.PureComponent { +class Select extends React.PureComponent { static propTypes = { - className: string + className: string, + forwardedRef: func }; static defaultProps = { - className: null + className: null, + forwardedRef: null }; render() { - const { className, ...passDownProps } = this.props; + const { className, forwardedRef, ...passDownProps } = this.props; return ( + ; +});