Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

setValue issue #65

Open
pawellewandowski opened this issue Sep 21, 2016 · 3 comments
Open

setValue issue #65

pawellewandowski opened this issue Sep 21, 2016 · 3 comments

Comments

@pawellewandowski
Copy link

Good evening,

I found some issue in form generator, when I used setValue method system on InputField application is blocked for 10 second(unblocked when value was set)

@MichaelCereda
Copy link
Owner

MichaelCereda commented Sep 21, 2016

Hello,
Can you please post your code, sounds like a loop.

Thanks for using my library

@pawellewandowski
Copy link
Author

I use simple only loop:
for (var k in data) { if (data.hasOwnProperty(k) && this.refs.rightForm.refs[k]) { console.log(k); this.refs.rightForm.refs[k].setValue(data[k]); } }

@MichaelCereda
Copy link
Owner

Ok but if you do that you will trigger also an onchange on the form at
every iteration.
You should assign the value using the__value__ prop.
Let me know if you have any problems.
Thank you.

On Wed, Sep 21, 2016, 3:30 PM pawellewandowski [email protected]
wrote:

I use simple only loop:
for (var k in data) {
if (data.hasOwnProperty(k) && this.refs.rightForm.refs[k]) {
console.log(k);
this.refs.rightForm.refs[k].setValue(data[k]);
}
}


You are receiving this because you commented.

Reply to this email directly, view it on GitHub
#65 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAGjfheviDWEj1veA_h_ZPMQjGVdso1Wks5qsYXggaJpZM4KDGNS
.

Michael Cereda
http://michaelcereda.com

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants