@@ -28,6 +28,7 @@ Usage example:
2828``` php
2929<?php
3030
31+ use integready\bulkactionscheckboxcolumn\BulkCheckboxColumn;
3132use kartik\grid\GridView;
3233
3334?>
@@ -37,26 +38,32 @@ use kartik\grid\GridView;
3738 'filterModel' => $searchModel,
3839 'columns' => [
3940 [
40- 'class' => 'integready\bulkactionscheckboxcolumn\ BulkCheckboxColumn' ,
41+ 'class' => BulkCheckboxColumn::className() ,
4142 'elements' => [
4243 [
43- 'label' => 'Change Availability',
44- 'field' => 'available',
45- 'items' => [
44+ 'label' => 'Change Availability',
45+ 'field' => 'available',
46+ 'items' => [
4647 1 => 'Yes',
4748 0 => 'No',
4849 ],
49- 'visible' => false,
50+ 'visible' => false,
5051 ],
51- // ...Many elements
5252 [
53- 'label' => 'Change International Shipping',
54- 'field' => 'intl_shipping',
55- 'items' => [
53+ 'label' => 'Change International Shipping',
54+ 'field' => 'intl_shipping',
55+ 'items' => [
5656 1 => 'Yes',
5757 0 => 'No',
5858 ],
59+ ],
60+ [
61+ 'label' => 'Change Author',
62+ 'field' => 'author_book',
63+ 'buttonType' => BulkCheckboxColumn::BUTTON_TYPE_CUSTOM_JS,
64+ 'customJs' => 'function(event, gridId, ids) { /* ... */ }'
5965 ]
66+ // ...Many elements
6067 ],
6168 ],
6269 // Other columns
0 commit comments