File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed
test/specs/collections/Form Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -10,14 +10,15 @@ import FormField from './FormField'
10
10
* @see Form
11
11
* @see TextArea
12
12
*/
13
- function FormTextArea ( props ) {
13
+ const FormTextArea = React . forwardRef ( function ( props , ref ) {
14
14
const { control } = props
15
15
const rest = getUnhandledProps ( FormTextArea , props )
16
16
const ElementType = getElementType ( FormTextArea , props )
17
17
18
- return < ElementType { ...rest } control = { control } />
19
- }
18
+ return < ElementType { ...rest } control = { control } ref = { ref } />
19
+ } )
20
20
21
+ FormTextArea . displayName = 'FormTextArea'
21
22
FormTextArea . propTypes = {
22
23
/** An element type to render as (string or function). */
23
24
as : PropTypes . elementType ,
Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ import * as common from 'test/specs/commonTests'
6
6
7
7
describe ( 'FormTextArea' , ( ) => {
8
8
common . isConformant ( FormTextArea )
9
+ common . forwardsRef ( FormTextArea , { tagName : 'textarea' } )
9
10
common . labelImplementsHtmlForProp ( FormTextArea )
10
11
11
12
it ( 'renders a FormField with a TextArea control' , ( ) => {
You can’t perform that action at this time.
0 commit comments