Skip to content

Commit 361e0a4

Browse files
authored
Update AjaxSelect.php
1 parent ab19404 commit 361e0a4

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/Form/AjaxSelect.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,14 @@ class AjaxSelect extends \Nette\Forms\Controls\SelectBox implements \Nette\Appli
1818
{
1919
use TAjaxSelect;
2020

21-
public const SIGNAL_NAME = 'load';
21+
public const CALLBACK_SIGNAL_NAME = 'load';
22+
public const ONCHANGE_SIGNAL_NAME = 'onchange';
2223

23-
public function __construct(?string $label, callable $callback)
24+
public function __construct(?string $label, callable $callback, callable $onchange = null)
2425
{
2526
$this->callback = $callback;
27+
$this->onchange = $onchange;
28+
2629
parent::__construct($label);
2730
}
2831
}

0 commit comments

Comments
 (0)