public function attached($form)
{
if ($form instanceof Form) {
/** @var Nette\Forms\Container $container */
$container = $this->getParent();
$container->addComponent($this->wrappedControl, $this->componentName);
$container->addComponent($this->applyButton, $this->componentName . '_apply');
$this->applyButton->controlPrototype->{'data-apply-button'} = $this->wrappedControl->getHtmlId();
}
}