Skip to content

Commit d0955ae

Browse files
committed
update doc
1 parent d36a8ed commit d0955ae

File tree

1 file changed

+22
-2
lines changed

1 file changed

+22
-2
lines changed

README.md

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,14 @@ component.dataTable.rows.add(newDataArray).draw();
1414
> You will require these to use with Bootstrap 4:
1515
1616
```html
17-
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
1817
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous">
1918
<link rel="stylesheet" href='https://cdn.datatables.net/1.10.19/css/dataTables.bootstrap4.min.css'>
19+
20+
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
2021
<script src="https://cdn.jsdelivr.net/npm/vue@2.5.17/dist/vue.js"></script>
2122

2223
<script>
23-
import VdtnetTable from '../src'
24+
import VdtnetTable from 'vue-datatables-net'
2425
import 'datatables.net-bs4'
2526
2627
/*
@@ -51,6 +52,25 @@ import 'datatables.net-select-bs4/css/select.bootstrap4.min.css';
5152
5253
This demonstrate how to pass in overrides for our [jQuery DataTable](https://datatables.net/manual/options) default options - https://github.com/niiknow/vue-datatables-net/blob/master/example/App.vue#L8
5354

55+
**NOTE:**
56+
The example app use free API endpoint from typicode [https://jsonplaceholder.typicode.com] so it's not jQuery DataTable.net compatible. As a result, we have to define a dataSrc wrapper like so:
57+
```
58+
ajax: {
59+
url: 'https://jsonplaceholder.typicode.com/users',
60+
dataSrc: (json) => {
61+
return json
62+
}
63+
}
64+
```
65+
66+
Some example server-side ajax parsers implementation:
67+
* PHP - https://github.com/lampjunkie/php-datatables
68+
* PHP Symphony - https://github.com/stwe/DatatablesBundle
69+
* PHP Laravel - https://github.com/yajra/laravel-datatables
70+
* dotNET - https://github.com/ALMMa/datatables.aspnet, https://github.com/garvincasimir/csharp-datatables-parser
71+
* NodeJS - https://github.com/jpravetz/node-datatable
72+
* Rails - https://github.com/jbox-web/ajax-datatables-rails
73+
5474
> Or simply with url that can handle datatable.net server-side endpoint:
5575
5676
```html

0 commit comments

Comments
 (0)