2017 © Pedro Peláez
 

library sortablegridview

A sortable grid view for Yii2

image

tsvetann/sortablegridview

A sortable grid view for Yii2

  • Wednesday, November 8, 2017
  • by bettor
  • Repository
  • 2 Watchers
  • 4 Stars
  • 1,112 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 1 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

This repo is outdated and unmaintained

SortableGridview

Yii2 Sortable Gridview, (*1)

What is sortable gridview

Sometimes one needs a more complex jquery sortable element such that you can filter the elements in a bigger database and then be able to sort the results. Sortable Gridview fulfills this gap, (*2)

Usage

There is an additional attribute available sortOptions = []. It takes options from the jquery ui sortable, (*3)

echo SortableGridview::widget([
            'dataProvider' => $dataProvider,
            'filterModel' => $filterModel,
            'options' => [
                'id' => 'targetTable',
                'class' => 'grid-view'
            ],
            'sortOptions' => [
                'placeholder' => 'ui-state-highlight',
                'cursor' => 'move',
                'receive' => new JsExpression("function(event, ui) {
                    console.log('receive');
                }"),
                'change' => new JsExpression("function(event, ui) {
                    console.log('change');
                }"),
            ],
            'columns' => [

                'id',
                'title',
            ],
        ]);

Installation via composer

require: "tsvetann/sortablegridview": "dev-master", (*4)

The Versions

08/11 2017

dev-master

9999999-dev https://github.com/tsvetann

A sortable grid view for Yii2

  Sources   Download

MIT

The Requires

 

sortable gridview jquery sortable