Skip to content

Commit 7a9d315

Browse files
authored
Update README.md
1 parent 6bb0cec commit 7a9d315

File tree

1 file changed

+17
-4
lines changed

1 file changed

+17
-4
lines changed

README.md

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,23 @@ to the require section of your `composer.json` file.
3131
]) ?>
3232
```
3333

34+
## DataTable options
35+
Also you can use all [Datatables options](https://datatables.net/reference/option/)
36+
37+
To pass them as widget options:
38+
```php
39+
<?= \nullref\datatable\DataTable::widget([
40+
'data' => $dataProvider->getModels(),
41+
'scrollY' => '200px',
42+
'scrollCollapse' => true,
43+
'paging' => false,
44+
'columns' => [
45+
'name',
46+
'email'
47+
],
48+
]) ?>
49+
```
50+
3451
## Add Links to row
3552

3653
```php
@@ -136,7 +153,3 @@ And add options to widget:
136153
'ajax' => '/site/datatables',
137154
]) ?>
138155
```
139-
140-
141-
142-

0 commit comments

Comments
 (0)