Skip to content

Commit ab19404

Browse files
authored
Update AjaxMultiSelect.php
1 parent a85d077 commit ab19404

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/Form/AjaxMultiSelect.php

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

21-
public const SIGNAL_NAME = AjaxSelect::SIGNAL_NAME;
21+
public const CALLBACK_SIGNAL_NAME = AjaxSelect::CALLBACK_SIGNAL_NAME;
22+
public const ONCHANGE_SIGNAL_NAME = AjaxSelect::ONCHANGE_SIGNAL_NAME;
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)