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
This library is simply a wrapper for [jQuery DataTable](https://datatables.net/). It's a tiny package that doesn't include anything, not even the datatable.net core library. Per example below, you basically have to include only/any datatable.net package(s) that you need.
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.
5
5
6
-
The initial focus/design of this library is to use with ajax/server-side endpoint. For local data, simply use native methods like so:
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:
> See example [App](https://niiknow.github.io/vue-datatables-net/)
64
67
65
-
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
68
+
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
66
69
67
70
**NOTE:**
68
-
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:
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:
-`render` custom cell rendering function https://datatables.net/reference/option/columns.render
124
158
125
159
## Additional Headers
126
-
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 DataTable example](https://editor.datatables.net/manual/security#Prevention)
127
161
128
162
i.e, something like:
129
163
```javascript
@@ -141,7 +175,7 @@ options: {
141
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)
142
176
143
177
## Row Action Buttons
144
-
Use `data-action` attribute to automatically wire up any action button/elements. To render action button/element in a row, simply define field like below (also, see example App):
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:
145
179
```javascript
146
180
actions: {
147
181
label:'Actions',
@@ -150,11 +184,4 @@ actions: {
150
184
}
151
185
```
152
186
153
-
## Selectable
154
-
> set this to enable datatable.net-select extension
0 commit comments