Skip to content

Commit d8f5562

Browse files
committed
fix error on orders object
1 parent bb04b47 commit d8f5562

File tree

8 files changed

+21633
-21083
lines changed

8 files changed

+21633
-21083
lines changed

example/index.js

+451-15,521
Large diffs are not rendered by default.

example/index.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/index.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/index.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/mix-manifest.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
2-
"/index.js": "/index.js?id=3a856874d4d38eaf42dc",
3-
"/index.js.map": "/index.js.map?id=e0570d9573316e067c63"
2+
"/index.js": "/index.js?id=c3150f74252920b08c5b",
3+
"/index.js.map": "/index.js.map?id=e18a32d01cac4489a1f2"
44
}

package-lock.json

+21,165-5,546
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "vue-datatables-net",
33
"description": "Vue jQuery DataTables.net wrapper component",
4-
"version": "1.2.8",
4+
"version": "1.3.0",
55
"author": "[email protected]",
66
"license": "MIT",
77
"main": "lib/index.js",
@@ -24,7 +24,6 @@
2424
"lint-fix": "eslint --fix --ext .js,.vue src/ example/app.*",
2525
"check-outdated": "npm outdated"
2626
},
27-
"dependencies": {},
2827
"browserslist": [
2928
"> 1%",
3029
"last 2 versions",
@@ -56,7 +55,7 @@
5655
"eslint-plugin-vue": "^5.2.3",
5756
"file-loader": "^3.0.1",
5857
"jquery": "^3.5.1",
59-
"laravel-mix": "^4.1.4",
58+
"laravel-mix": "^5.0.9",
6059
"vue": "^2.6.11",
6160
"vue-loader": "^15.9.3",
6261
"vue-template-compiler": "^2.6.11"

src/VdtnetTable.vue

+10-8
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
:placeholder="field.label"
5757
:class="columnSearchClassName"
5858
type="search"
59-
/>
59+
>
6060
<div
6161
v-else-if="!columnSearch"
6262
v-html="field.label"
@@ -265,6 +265,8 @@ export default {
265265
that.options = jq.extend({}, that.options, that.opts)
266266
}
267267
268+
that.options.order = that.options.order || [[startCol, 'asc']]
269+
268270
if (that.fields) {
269271
const fields = that.fields
270272
let cols = that.options.columns
@@ -426,23 +428,23 @@ export default {
426428
427429
if (!that.hideFooter && that.columnSearch) {
428430
that.options.initComplete = function () {
429-
let api = this.api();
430-
let state = api.state.loaded();
431+
let api = this.api()
432+
let state = api.state.loaded()
431433
432434
api.columns().every(function () {
433-
const that = this;
434-
const colIdx = this.index();
435+
const that = this
436+
const colIdx = this.index()
435437
436438
if(state){
437-
let colSearch = state.columns[colIdx].search;
439+
let colSearch = state.columns[colIdx].search
438440
if (colSearch.search){
439-
jq('input', this.footer()).val(colSearch.search);
441+
jq('input', this.footer()).val(colSearch.search)
440442
}
441443
}
442444
443445
jq('input', this.footer()).on('keyup change clear search', function () {
444446
if (that.search() !== this.value) {
445-
that.search(this.value).draw();
447+
that.search(this.value).draw()
446448
}
447449
})
448450
})

0 commit comments

Comments
 (0)