-
-
Notifications
You must be signed in to change notification settings - Fork 148
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
removeComponent() and getControls() in group #155
Comments
This issue probably caused, why can not add component to the specific position with rendering with groups. Expected output (without groups): protected function createComponentForm(): \Nette\Application\UI\Form {
$form = new \Nette\Application\UI\Form;
//$form->addGroup("group1");
$form->addText("input1", "input1");
$form->addText("input2", "input2");
$form->addSubmit("send1", "send1");
$form->addSubmit("send2", "send2");
$form->addComponent(new \Nette\Forms\Controls\TextInput("input3"), "input3", "send1");
return $form;
} Invalid inputs position (with groups): protected function createComponentForm(): \Nette\Application\UI\Form {
$form = new \Nette\Application\UI\Form;
$form->addGroup("group1");
$form->addText("input1", "input1");
$form->addText("input2", "input2");
$form->addSubmit("send1", "send1");
$form->addSubmit("send2", "send2");
$form->addComponent(new \Nette\Forms\Controls\TextInput("input3"), "input3", "send1");
return $form;
} |
Remove component from form really doesn't remove component from group. Due to the general concept of groups, this can not be changed in 2.4. So I added method remove() and removeOrphans() which removes unused controls. |
@dg tnx! For rendering problems, describe here: #155 (comment), do I create new issue? |
Yes. It is much more complicated to solve. |
Description
I have no idea if is bug or intention. but if I remove component from form, component still exist in group controls.
Steps To Reproduce
The text was updated successfully, but these errors were encountered: