1
0
mirror of https://github.com/ascribe/onion.git synced 2024-06-30 21:52:08 +02:00

solves the issue for textarea_toggable

couldnt reproduce login
This commit is contained in:
diminator 2015-07-22 17:12:00 +02:00
parent 61077de3de
commit e060d39486

View File

@ -39,13 +39,14 @@ let Form = React.createClass({
this.setState(this.getInitialState());
},
submit(event){
console.log('submit')
if (event) {
event.preventDefault();
}
this.setState({submitted: true});
this.clearErrors();
let action = (this.httpVerb && this.httpVerb()) || 'post';
this[action]();
window.setTimeout(() => this[action](), 100);
},
post(){
requests
@ -56,9 +57,14 @@ let Form = React.createClass({
getFormData(){
let data = {};
console.log('data')
for (let ref in this.refs){
data[this.refs[ref].props.name] = this.refs[ref].state.value;
console.log(this.refs[ref].state.value)
console.log(this.refs[ref].refs.input.state.value)
}
//console.log(data)
if ('getFormData' in this.props){
data = mergeOptionsWithDuplicates(data, this.props.getFormData());
}