Closed vojtech-dobes closed 10 years ago
Well, yes. But I was afraid to clear the callback. It makes sense but I'm still not sure if the click callback should be doing it.
You mean whether be so drastic, or just whether it should be in this place? I guess that as same as adding error expects onSuccess
to stop, adding another dynamic container (for filling values) expects it too. onSuccess
means end of the form. Adding another few empty fields is not success :).
That's why I'm always advising people to use only onClicks when you have at least one on form.
I know, but onClick
event is primarily for distinction of buttons (which all after adding have no function). But replicator's special buttons have function. I think this would make things simplier (and prevent people from being surprised why redirect occurs when it should not) without any real harm (nobody wants to process form on adding another container - if he does, he can attach this function to proper onClick
rather :).
Like it!
Ok, let's try it :)
Thanks for the pull!
:+1:
I usually add redirect after form submit into
onSuccess[]
event. But when you click button withaddCreateOnClick
oraddRemoveOnClick
, you probably never want any final processing of the form. This would also remove requirement to attach final processing toonClick
event of primary send button.