Closed matrixinfologics closed 6 years ago
The simplest solution is snippets
$multiplier->addRemoveButton('Remove', function (Nette\Forms\Controls\SubmitButton $button) {
$button->setHtmlAttribute('class', 'ajax');
$button->onClick[] = function () {
$this->redrawControl('mySnippet');
};
});
$multiplier->addCreateButton('Create', 1, function (Submitter $button) {
$button->setHtmlAttribute('class', 'ajax');
$button->onClick[] = function () {
$this->redrawControl('mySnippet');
};
});
It refreshes the page which takes a little while and mainly the page jumps back to the top - in case that when adding many items this might get quite anyoing. Please suggest me solution.