From da65035f4b04a51b68b12426fefc77f8df095955 Mon Sep 17 00:00:00 2001 From: Dave MacFarlane Date: Fri, 17 Mar 2023 08:59:49 -0400 Subject: [PATCH] [Form.js] Add placeholder option for TextareaElement (#8412) This adds a placeholder option for the TextareaElement, similar to TextboxElements. --- jsx/Form.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/jsx/Form.js b/jsx/Form.js index af3c444cc04..0e2dc96ccc3 100644 --- a/jsx/Form.js +++ b/jsx/Form.js @@ -1048,6 +1048,7 @@ class TextareaElement extends Component { name={this.props.name} id={this.props.id} value={this.props.value || ''} + placeholder={this.props.placeholder} required={required} disabled={disabled} onChange={this.handleChange} @@ -1063,6 +1064,7 @@ TextareaElement.propTypes = { name: PropTypes.string.isRequired, label: PropTypes.string, value: PropTypes.string, + placeholder: PropTypes.string, id: PropTypes.string, disabled: PropTypes.bool, required: PropTypes.bool, @@ -1075,6 +1077,7 @@ TextareaElement.defaultProps = { name: '', label: '', value: '', + placeholder: '', id: null, disabled: false, required: false,