<commit_before>/**
 * Created by steve on 15/09/15.
 */
import React from 'react';
import ComposedComponent from './ComposedComponent';
import TextField from 'material-ui/TextField';

class TextArea extends React.Component {

    render() {
        // FIXME: Obviously fix rowsMax eventually..
        //console.log('TextArea', this.props.form);
        return (
            <div className={this.props.form.htmlClass}>
                <TextField
                    type={this.props.form.type}
                    floatingLabelText={this.props.form.title}
                    hintText={this.props.form.placeholder}
                    onChange={this.props.onChangeValidate}
                    errorText={this.props.error}
                    defaultValue={this.props.value}
                    multiLine={true}
                    rows={this.props.form.rows}
                    rowsMax={this.props.form.rowsMax}
                    disabled={this.props.form.readonly}
                    style={this.props.form.style || {width: '100%'}}
                />
            </div>
        );
    }
}

export default ComposedComponent(TextArea);<commit_msg>Handle `TextArea` errors<commit_after>/**
 * Created by steve on 15/09/15.
 */
import React from 'react';
import ComposedComponent from './ComposedComponent';
import TextField from 'material-ui/TextField';

class TextArea extends React.Component {

    render() {
        // FIXME: Obviously fix rowsMax eventually..
        //console.log('TextArea', this.props.form);
        return (
            <div className={this.props.form.htmlClass}>
                <TextField
                    type={this.props.form.type}
                    floatingLabelText={this.props.form.title}
                    hintText={this.props.form.placeholder}
                    onChange={this.props.onChangeValidate}
                    errorText={this.props.error || this.props.errorText}
                    defaultValue={this.props.value}
                    multiLine={true}
                    rows={this.props.form.rows}
                    rowsMax={this.props.form.rowsMax}
                    disabled={this.props.form.readonly}
                    style={this.props.form.style || {width: '100%'}}
                />
            </div>
        );
    }
}

export default ComposedComponent(TextArea);
{'fraction_non_alphanumeric': 0.1188542112013681, 'fraction_numerical': 0.007695596408721676, 'mean_word_length': 1.6804123711340206, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6489904', 'n_tokens_mistral': 623, 'n_tokens_neox': 588, 'n_words': 104}