<commit_before>import PropTypes from 'prop-types'
import React from 'react'
import ReactQuill from 'react-quill'
import 'react-quill/dist/quill.snow.css'
import FormGroup from '../bootstrap/forms/FormGroup'

export default class TextAreaFormGroup extends React.Component {
	static defaultProps = {}

	static propTypes = {
		disabled         : PropTypes.bool,
		id               : PropTypes.string.isRequired,
		label            : PropTypes.string,
		onChange         : PropTypes.func.isRequired,
		required         : PropTypes.bool,
		value            : PropTypes.string.isRequired,
		valid            : PropTypes.bool,
		validationMessage: PropTypes.string
	}
	       onChange  = value => {
		       this.setState({value})
		       if (this.props.onChange) {
			       this.props.onChange(
				       {
					       target:
						       {
							       id   : this.props.id,
							       value: value
						       }
				       }
			       )
		       }
	       }

	constructor(props) {
		super(props)
		this.state = {
			value: props.value
		}
	}

	render() {
		let {disabled, id, label, required, valid, validationMessage} = this.props
		let componentId                                               = `TextAreaFormGroup-${id}`
		let className                                                 = 'form-control'
		if (validationMessage) {
			className += valid ? " is-valid" : " is-invalid"
		}
		return <FormGroup id={componentId} label={label} required={required} valid={valid}
		                  validationMessage={validationMessage}>
			<ReactQuill
				id={componentId}
				className={className}
				onChange={this.onChange}
				value={this.state.value}
			/>
		</FormGroup>
	}
}<commit_msg>[#120] Refer to github issue fixes #120<commit_after>import PropTypes from 'prop-types'
import React from 'react'
import ReactQuill from 'react-quill'
import FormGroup from '../bootstrap/forms/FormGroup'

export default class TextAreaFormGroup extends React.Component {

	static propTypes = {
		disabled         : PropTypes.bool,
		id               : PropTypes.string.isRequired,
		label            : PropTypes.string,
		onChange         : PropTypes.func.isRequired,
		required         : PropTypes.bool,
		value            : PropTypes.string.isRequired,
		valid            : PropTypes.bool,
		validationMessage: PropTypes.string
	}

	onChange = value => {
		if (this.props.onChange) {
			this.props.onChange(
				{
					target:
						{
							id   : this.props.id,
							value: value
						}
				}
			)
		}
	}


	render() {
		let {id, label, required, valid, validationMessage, value} = this.props
		let componentId                                            = `TextAreaFormGroup-${id}`
		let className                                              = 'form-control'
		if (validationMessage) {
			className += valid ? " is-valid" : " is-invalid"
		}
		return <FormGroup id={componentId} label={label} required={required} valid={valid}
		                  validationMessage={validationMessage}>
			<ReactQuill
				id={componentId}
				className={className}
				onChange={this.onChange}
				value={value}
			/>
		</FormGroup>
	}
}
{'fraction_non_alphanumeric': 0.10605575136174303, 'fraction_numerical': 0.0019224607497596924, 'mean_word_length': 1.9733333333333334, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 8, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6184828', 'n_tokens_mistral': 1026, 'n_tokens_neox': 867, 'n_words': 184}