Skip to content
This repository was archived by the owner on Aug 16, 2023. It is now read-only.

clientEvents not working #12

@d3artagnan

Description

@d3artagnan

<?= 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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions