Closed SebastianMuniz closed 7 years ago
You get the field instance with form.$('name')
and you can wire the handler in this way:
<TextField
{...form.$('name').bind({
onChange: this.handleMyFieldOnChange(form.$('name'))
})}
/>
I though i tried that, I'm feeling a little embarrased right now. Thanks you very much!!! I was neeeding this to complete a task this week and you saved us! Really thank you!!
files.zip
Hey Claudio, I been trying to use your library, and I can’t get my head around the following thing. Where did “field” come from??? I been trying to wire my own field handler let’s say “handleMyFieldOnChange" to your field handler. I had read all your blog post and docs but I cant figure out where you get that field object from. I have a React component and I want to link my field handler to your field store so when the input changes I validate but also I add the data to my ObjectStore. I tried implementing custom bindings, but I still dont get how to bind a method from my own React component. I dont know if I explain well myself, I would really appreciatte a little of help with this. I will leave you my code here and I attached those files
My code:
// I skipped imports here
AND MyForm component: