clientEvents not working
Opened this issue · 0 comments
d3artagnan commented
<?= Sortable::widget([ 'items' => $items, 'clientEvents' => [ 'move' => 'function () { alert("element has been moved"); }', ], ]) ?>
This throw Invalid Configuration, Unknow event "move".
I think this because on registerClientEvents
about line 416
the code check if (isset($this->_availableClientEvents[$event])) {
while private $_availableClientEvents = ['choose', 'start', 'end', 'add', 'update', 'sort', 'remove', 'filter', 'move', 'clone'];
can you use in_array($event, $this->_availableClientEvents)
instead?