File tree Expand file tree Collapse file tree 1 file changed +10
-6
lines changed
Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -53,13 +53,17 @@ public function getControl(): \Nette\Utils\Html
5353 $ attrs = [];
5454 $ control = parent ::getControl ();
5555
56- $ attrs ['data-ajaxselect ' ] = $ this ->getForm ()->getPresenter ()->link (
57- $ this ->lookupPath (Presenter::class) . IComponent::NAME_SEPARATOR . self ::CALLBACK_SIGNAL_NAME . '! '
58- );
56+ if ($ this ->callback ) {
57+ $ attrs ['data-ajaxselect ' ] = $ this ->getForm ()->getPresenter ()->link (
58+ $ this ->lookupPath (Presenter::class) . IComponent::NAME_SEPARATOR . self ::CALLBACK_SIGNAL_NAME . '! '
59+ );
60+ }
5961
60- $ attrs ['data-onchange ' ] = $ this ->getForm ()->getPresenter ()->link (
61- $ this ->lookupPath (Presenter::class) . IComponent::NAME_SEPARATOR . self ::ONCHANGE_SIGNAL_NAME . '! '
62- );
62+ if ($ this ->onchange ) {
63+ $ attrs ['data-onchange ' ] = $ this ->getForm ()->getPresenter ()->link (
64+ $ this ->lookupPath (Presenter::class) . IComponent::NAME_SEPARATOR . self ::ONCHANGE_SIGNAL_NAME . '! '
65+ );
66+ }
6367
6468 $ control ->addAttributes ($ attrs );
6569 return $ control ;
You can’t perform that action at this time.
0 commit comments