Closed BigOHenry closed 5 years ago
If you replace
if ($resolver->isRemoveAction() && $this->totalCopies >= $this->minCopies && !$resolver->reachedMinLimit()) {
$this->resetFormEvents();
}
with
if ($resolver->isRemoveAction() && $this->totalCopies >= $this->minCopies && !$resolver->reachedMinLimit()) {
$container = $this->addCopy($resolver->getRemoveId());
$container->getComponent(self::SUBMIT_REMOVE_NAME)->onClick[] = function () use ($container) {
$this->removeAllComponents($container);
$this->removeComponent($container);
};
$this->resetFormEvents();
}
everything is alright?
Where should i replace it? In my code is nothing like this and at vendor same.
in dev-master version you can try this:
$multiplier->onRemove[] = function () use ($presenter) {
/** @var \Nette\Application\UI\Presenter $presenter */
$presenter->redrawControl('segmentForm');
}
with "webchemistry/forms-multiplier": "@dev",
and your code getting this error: Cannot read an undeclared property WebChemistry\Forms\Controls\Multiplier::$onRemove.
$groups->onRemove[] = function () use ($presenter) {
/** @var \Nette\Application\UI\Presenter $presenter */
$presenter->redrawControl('segmentForm');
};
It's now contributte/forms-multiplier:dev-master
Problem 1
- Installation request for contributte/forms-multiplier dev-master -> satisfiable by contributte/forms-multiplier[dev-master].
- contributte/forms-multiplier dev-master requires nette/forms ^3.0 -> satisfiable by nette/forms[3.0.x-dev, v3.0.0-RC1, v3.0.0-RC2, v3.0.0-alpha1, v3.0.0-beta] but these conflict with your requirements or minimum-stability.
I cant test this then. We will upgrade nette to 3.0 after final release. So i am stuck for 3.0.4. But its fine, its working :-)
I finally tested the Nette 3 and dev version of forms-multiplier. Looks like this issue is fixed :-) Thank you!
Hello, i have got problem with container removing in 3.0.5 (3.0.4 works fine).
remove button definition in form component:
component form template:
Problem is snippet segmentForm is not refreshed.
Thank you for check.