Closed martypala closed 6 years ago
This could help
$multiplier->addRemoveButton(null, function (SubmitButton $submitter) {
$submitter->onClick[] = function () {
// redraw snippet
};
$submitter->setHtmlAttribute('class', 'ajax');
});
throws MemberAccessException: Cannot read an undeclared property Nette\Forms\Controls\SubmitButton::$onSubmit.
Yeah sorry, I mean onClick. Edit the code
Not working, ajax css class is not appended to html element
$itemsMultiplier->addRemoveButton('Smazat', function (Nette\Forms\Controls\SubmitButton $submitter) { $submitter->onClick[] = function () { $this->redrawControl('variantsCont'); }; $submitter->setHtmlAttribute('class', 'ajax'); });
If you use manual render you must add class into a template.
OK, now it working. Ajaxified adding/removing of rows. Thanks! Díky :)
Is there some way how to ajaxify adding/removing of rows?