Skip to content

Commit f02e334

Browse files
authored
Merge pull request #175 from jrhicks/master
Textarea needs inputRef similar to Input so we can focus onComponentD…
2 parents b90d9c6 + 58ea599 commit f02e334

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/scripts/Textarea.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,12 @@ export default class Textarea extends Component {
3030
</FormElement>
3131
);
3232
}
33-
const { className, ...pprops } = props;
33+
const { className, textareaRef, ...pprops } = props;
3434
const taClassNames = classnames(className, 'slds-input');
3535
return (
3636
<textarea
3737
id={ id }
38+
ref={ textareaRef }
3839
className={ taClassNames }
3940
onChange={ this.onChange }
4041
{ ...pprops }
@@ -52,6 +53,7 @@ Textarea.propTypes = {
5253
totalCols: PropTypes.number,
5354
cols: PropTypes.number,
5455
onChange: PropTypes.func,
56+
textareaRef: PropTypes.func,
5557
};
5658

5759
Textarea.isFormElement = true;

0 commit comments

Comments
 (0)