Skip to content

Commit 46d0046

Browse files
committed
fix documentation for event name
1 parent ec5d937 commit 46d0046

File tree

4 files changed

+24
-6
lines changed

4 files changed

+24
-6
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -225,8 +225,8 @@ One `Purpose` of this component is to extend jQuery DataTables function and feat
225225
Custom events for this component.
226226
```html
227227
<vdtnet-table ...
228-
@tableCreating="doSomethingBeforeDataTableCreate"
229-
@tableCreated="doSomethingImmediatelyAfterTableCreatedAndInitialized"
228+
@table-creating="doSomethingBeforeDataTableCreate"
229+
@table-created="doSomethingImmediatelyAfterTableCreatedAndInitialized"
230230
@reloaded="doSomethingAfterDataLoadOrReloaded"
231231
/>
232232
```
@@ -237,8 +237,8 @@ Custom events for this component.
237237
comp.dataTable.on( 'order.dt', function () { eventFired( 'Order' ); } )
238238
}
239239
```
240-
- `tableCreating` this is right before jQuery(el).DataTable(component.options) is called allowing you to modify component options.
241-
- `tableCreated` this is after we called jQuery(el).DataTable and initialized all the columns.
240+
- `table-creating` this is right before jQuery(el).DataTable(component.options) is called allowing you to modify component options.
241+
- `table-created` this is after we called jQuery(el).DataTable and initialized all the columns.
242242
- `reloaded` this is after data has been load/reloaded
243243

244244
## Additional Headers

example/app.vue

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@
4747
@edit="doAlertEdit"
4848
@delete="doAlertDelete"
4949
@reloaded="doAfterReload"
50+
@table-creating="doCreating"
51+
@table-created="doCreated"
5052
>
5153
<template slot="HEAD__details_control">
5254
Show Details
@@ -156,6 +158,12 @@ export default {
156158
doAfterReload(data, table) {
157159
window.alert('data reloaded')
158160
},
161+
doCreating(comp, el) {
162+
console.log('creating')
163+
},
164+
doCreated(comp) {
165+
console.log('created')
166+
},
159167
doSearch() {
160168
this.$refs.table.search(this.quickSearch)
161169
},

example/index.js

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,6 +271,8 @@ __webpack_require__.r(__webpack_exports__);
271271
//
272272
//
273273
//
274+
//
275+
//
274276
// this demonstrate with buttons and responsive master/details row
275277

276278
// import buttons and plugins
@@ -382,6 +384,12 @@ __webpack_require__.r(__webpack_exports__);
382384
doAfterReload: function doAfterReload(data, table) {
383385
window.alert('data reloaded');
384386
},
387+
doCreating: function doCreating(comp, el) {
388+
console.log('creating');
389+
},
390+
doCreated: function doCreated(comp) {
391+
console.log('created');
392+
},
385393
doSearch: function doSearch() {
386394
this.$refs.table.search(this.quickSearch);
387395
},
@@ -22091,7 +22099,9 @@ var render = function() {
2209122099
on: {
2209222100
edit: _vm.doAlertEdit,
2209322101
delete: _vm.doAlertDelete,
22094-
reloaded: _vm.doAfterReload
22102+
reloaded: _vm.doAfterReload,
22103+
"table-creating": _vm.doCreating,
22104+
"table-created": _vm.doCreated
2209522105
}
2209622106
},
2209722107
[

example/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)