Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions src/collections/Form/FormTextArea.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,15 @@ import FormField from './FormField'
* @see Form
* @see TextArea
*/
function FormTextArea(props) {
const FormTextArea = React.forwardRef(function (props, ref) {
const { control } = props
const rest = getUnhandledProps(FormTextArea, props)
const ElementType = getElementType(FormTextArea, props)

return <ElementType {...rest} control={control} />
}
return <ElementType {...rest} control={control} ref={ref} />
})

FormTextArea.displayName = 'FormTextArea'
FormTextArea.propTypes = {
/** An element type to render as (string or function). */
as: PropTypes.elementType,
Expand Down
1 change: 1 addition & 0 deletions test/specs/collections/Form/FormTextArea-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import * as common from 'test/specs/commonTests'

describe('FormTextArea', () => {
common.isConformant(FormTextArea)
common.forwardsRef(FormTextArea, { tagName: 'textarea' })
common.labelImplementsHtmlForProp(FormTextArea)

it('renders a FormField with a TextArea control', () => {
Expand Down