You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+13-13Lines changed: 13 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,9 +1,9 @@
1
1
# vue-datatables-net
2
-
> Vue jQuery DataTable.net wrapper component
2
+
> Vue jQuery DataTables.net wrapper component
3
3
4
-
This library is a wrapper for [jQuery DataTable](https://datatables.net/). It's a tiny package that doesn't include anything, not even the datatables.net core library.
4
+
This library is a Vue 2 wrapper for [jQuery DataTables](https://datatables.net/). It's a tiny wrapper that doesn't include anything, not even the datatables.net core library.
5
5
6
-
The initial focus/design of this library is to use with ajax/server-side endpoint. Though, since it is a datatables.net wrapper, local data use/loading is simply:
6
+
The initial focus/design is to use with ajax/server-side endpoint. Though, since it is just a wrapper, local data use/loading is simply:
7
7
8
8
```javascript
9
9
component.dataTable.clear().draw();
@@ -24,7 +24,9 @@ npm run build
24
24
```
25
25
26
26
## Usage
27
-
> You will require these to use with Bootstrap 4:
27
+
This library default configuration and provide example for use with `bootstrap4` styling. Though, you can fully customize with any other jQuery DataTables supported theme.
Example App 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
69
71
70
72
**NOTE:**
71
-
The example App use free API endpoint from typicode [https://jsonplaceholder.typicode.com] so it's not jQuery DataTable.net queryable. As a result, we have to define a dataSrc wrapper like so:
73
+
Our example use a free API endpoint from [typicode](https://jsonplaceholder.typicode.com), which is simply a JSON endpoint. As a result, we define a `dataSrc` wrapper like so:
-`render` custom cell rendering function https://datatables.net/reference/option/columns.render
158
158
159
159
## Additional Headers
160
-
Many server-side usage require CSRF and/or API token headers. Since options are completely exposed, simply use the native method per [jQuery DataTable example](https://editor.datatables.net/manual/security#Prevention)
160
+
Many server-side usage require CSRF and/or API token headers. Since options are completely exposed, simply use the native method per [jQuery DataTables example](https://editor.datatables.net/manual/security#Prevention)
161
161
162
162
i.e, something like:
163
163
```javascript
@@ -172,7 +172,7 @@ options: {
172
172
}
173
173
```
174
174
175
-
If you haven't already figured it out, ajax is basically the signature of [jQuery.ajax](http://api.jquery.com/jquery.ajax/) which is demonstrated here wrapped as [jQuery DataTable ajax pipeline](https://datatables.net/examples/server_side/pipeline.html)
175
+
If you haven't already figured it out, ajax is basically the signature of [jQuery.ajax](http://api.jquery.com/jquery.ajax/) which is demonstrated here wrapped as [jQuery DataTables ajax pipeline](https://datatables.net/examples/server_side/pipeline.html)
176
176
177
177
## Row Action Buttons
178
178
Use `data-action` attribute to automatically wire up any action button/elements. To render action button/element in a row, simply define dummy field like so:
0 commit comments