Skip to content

Commit 6ae89c4

Browse files
authored
Update README.md
1 parent ee9d6bc commit 6ae89c4

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,21 @@ Properties of `LinkColumn`:
7171
- `url` - will be passed to `Url::to()`;
7272
- `options` - HTML options of the `a` tag;
7373
- `queryParams` - array of params added to `url`
74+
- `render` - custom render js function. E.g:
75+
```php
76+
//config ...
77+
'columns' => [
78+
'id',
79+
//...
80+
[
81+
'class' => 'nullref\datatable\LinkColumn',
82+
'render' => new JsExpression('function render(data, type, row, meta ){
83+
return "<a href=\"/custom/url/"+row["id"]+"\">View</a>"
84+
}'),
85+
],
86+
],
87+
//...
88+
```
7489

7590
## Styling
7691

0 commit comments

Comments
 (0)