-
-
Notifications
You must be signed in to change notification settings - Fork 21
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
Add/remove buttons do not work when form is attached in constructor #47
Comments
This is old nette syntax, the correct is: public function createComponentAbcForm() : AbcForm {
$form = new AbcForm();
// ...
} |
Probably fixed by e3a337b |
@MartkCz I tried that already, does not work for us either, because we have createElements as a separate function call after construct, so when On the other hand removing $this (presenter) from the constructor seems to work fine atm. And moving createElements to constructor before parent::__construct() would be probably acceptable too as we only use the multiplier in a couple of special components and can cover that with some comments to explain the difference to other code. |
Hi there. I have same problem. The attached method is called before I am able to add create and remove button. Its called in I was thinking about to add some logic to |
The multiplier does not work when we create our form like this:
imho because the form is already attached in here so the onAnchor is never called
and the call during onRender is too late for the buttons to react properly and the form goes to onSuccess instead (the
submittedBy
is never set by the buttons in this case).I tried fixing it by calling
whenAttached()
directly when the form is already anchored but that broke something else and the add button was not rendered at all because it was not yet configured.The text was updated successfully, but these errors were encountered: