mirror of
https://github.com/ascribe/onion.git
synced 2025-02-14 21:10:27 +01:00
solves the issue for textarea_toggable
couldnt reproduce login
This commit is contained in:
parent
61077de3de
commit
e060d39486
@ -39,13 +39,14 @@ let Form = React.createClass({
|
|||||||
this.setState(this.getInitialState());
|
this.setState(this.getInitialState());
|
||||||
},
|
},
|
||||||
submit(event){
|
submit(event){
|
||||||
|
console.log('submit')
|
||||||
if (event) {
|
if (event) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
}
|
}
|
||||||
this.setState({submitted: true});
|
this.setState({submitted: true});
|
||||||
this.clearErrors();
|
this.clearErrors();
|
||||||
let action = (this.httpVerb && this.httpVerb()) || 'post';
|
let action = (this.httpVerb && this.httpVerb()) || 'post';
|
||||||
this[action]();
|
window.setTimeout(() => this[action](), 100);
|
||||||
},
|
},
|
||||||
post(){
|
post(){
|
||||||
requests
|
requests
|
||||||
@ -56,9 +57,14 @@ let Form = React.createClass({
|
|||||||
|
|
||||||
getFormData(){
|
getFormData(){
|
||||||
let data = {};
|
let data = {};
|
||||||
|
console.log('data')
|
||||||
for (let ref in this.refs){
|
for (let ref in this.refs){
|
||||||
data[this.refs[ref].props.name] = this.refs[ref].state.value;
|
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){
|
if ('getFormData' in this.props){
|
||||||
data = mergeOptionsWithDuplicates(data, this.props.getFormData());
|
data = mergeOptionsWithDuplicates(data, this.props.getFormData());
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user