A Yii 2.0 widget that allows you to create sortable lists and grids and manipulate them using simple drag and drop. It is based on the lightweight html5sortable jQuery plugin, which uses native HTML5 API for drag and drop. It is a leaner alternative for the JUI Sortable plugin and offers very similar functionality. The yii2-sortable widget offers these features:
You can see detailed documentation on usage of the extension.
The preferred way to install this extension is through composer.
NOTE: Check the composer.json for this extension's requirements and dependencies. Read this web tip /wiki on setting the
minimum-stability
settings for your application's composer.json.
Either run
$ php composer.phar require kartik-v/yii2-sortable "@dev"
or add
"kartik-v/yii2-sortable": "@dev"
to the require
section of your composer.json
file.
use kartik\sortable\Sortable;
echo Sortable::widget([
'type' => Sortable::TYPE_LIST,
'items' => [
['content' => 'Item # 1'],
['content' => 'Item # 2'],
['content' => 'Item # 3'],
]
]);
yii2-sortable is released under the BSD-3-Clause License. See the bundled LICENSE.md
for details.
yii2-sortable
Date: 09-Oct-2018
Date: 03-Sep-2018
kvHtml5Sortable
based on html5sortable
.src
directory.Date: 17-Jun-2015
connected
property will follow these rules:
false
or null/empty this widget will not be connected to any other sortable widget.true
, this widget will be connected to all other sortable widgets on the page with connected
property set to true
.Date: 10-Nov-2014
Date: 01-Jul-2014
Comments