-
Notifications
You must be signed in to change notification settings - Fork 13
Open
Labels
Description
When used any of BootstrapRenderers, snippet redraw sends the message but actual redraw never happens.
Presenter:
class SimplePresenter extends Nette\Application\UI\Presenter {
public function createComponentSimpleForm() {
$form = new Nette\Application\UI\Form();
$form->setRenderer(new BootstrapRenderer);
$form->getElementPrototype()->class('ajax');
$form->addText('text', 'Text');
$form->addSubmit('submit', 'Submit');
$form->onSuccess[] = array($this, 'onSuccess');
return $form;
}
public function onSuccess(Nette\Application\UI\Form $form) {
$form->setValues(array(), TRUE);
$this->redrawControl('form');
}
}
Template:
{block content}
{snippet form}
{control simpleForm}
{/snippet}
{/block}
All files are included, $.nette.init() called, other snippets redraws are working.
After commenting out line with $form->setRenderer(...) its works properly. Also when DefaultFormRenderer is used, everything works as expected.