Skip to content
This repository was archived by the owner on Apr 30, 2024. It is now read-only.

Commit 10e629d

Browse files
committed
0.5.8 Bugfix, corrected issue with reloading the table
1 parent c11f6f5 commit 10e629d

File tree

7 files changed

+64
-10
lines changed

7 files changed

+64
-10
lines changed

docs/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@
1313
);
1414
}
1515
}
16-
}(window.location))</script><link href=/laravel-vue-datatable/css/app.a12833b9.css rel=preload as=style><link href=/laravel-vue-datatable/css/chunk-vendors.f5109e5a.css rel=preload as=style><link href=/laravel-vue-datatable/js/app.2a3b1e61.js rel=preload as=script><link href=/laravel-vue-datatable/js/chunk-vendors.ba41ea86.js rel=preload as=script><link href=/laravel-vue-datatable/css/chunk-vendors.f5109e5a.css rel=stylesheet><link href=/laravel-vue-datatable/css/app.a12833b9.css rel=stylesheet></head><body class=min-h-100><noscript><strong>We're sorry but laravel-vue-datatable doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id=app></div><script src=/laravel-vue-datatable/js/chunk-vendors.ba41ea86.js></script><script src=/laravel-vue-datatable/js/app.2a3b1e61.js></script></body></html>
16+
}(window.location))</script><link href=/laravel-vue-datatable/css/app.a12833b9.css rel=preload as=style><link href=/laravel-vue-datatable/css/chunk-vendors.f5109e5a.css rel=preload as=style><link href=/laravel-vue-datatable/js/app.13e15f85.js rel=preload as=script><link href=/laravel-vue-datatable/js/chunk-vendors.ba41ea86.js rel=preload as=script><link href=/laravel-vue-datatable/css/chunk-vendors.f5109e5a.css rel=stylesheet><link href=/laravel-vue-datatable/css/app.a12833b9.css rel=stylesheet></head><body class=min-h-100><noscript><strong>We're sorry but laravel-vue-datatable doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id=app></div><script src=/laravel-vue-datatable/js/chunk-vendors.ba41ea86.js></script><script src=/laravel-vue-datatable/js/app.13e15f85.js></script></body></html>

docs/js/app.2a3b1e61.js renamed to docs/js/app.13e15f85.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/js/app.13e15f85.js.map

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

docs/js/app.2a3b1e61.js.map

Lines changed: 0 additions & 1 deletion
This file was deleted.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "laravel-vue-datatable",
3-
"version": "0.5.7",
3+
"version": "0.5.8",
44
"description": "Vue.js datatable made with Laravel and Bootstrap in mind",
55
"author": "James Dordoy <[email protected]>",
66
"homepage": "https://jamesdordoy.github.io/laravel-vue-datatable/",

src/components/DataTable.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ export default {
159159
};
160160
},
161161
methods: {
162-
getData(url = this.url, options = {}) {
162+
getData(url = this.url, options = this.getRequestPayload) {
163163
164164
url = this.checkUrlForPagination(url);
165165
Lines changed: 58 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,84 @@
11
<template>
22
<div>
33
<div class="row">
4-
<div class="col-md-12">
5-
<h2 class="markdown-header">Reloading the Datatable</h2>
4+
<div class="col-md-8">
5+
<h2 class="markdown-header">
6+
Reloading the Datatable
7+
</h2>
8+
</div>
9+
<div class="col-md-4 relative">
10+
<div class="show-code-inline">
11+
<label>Show Example Code</label>&nbsp;
12+
<vue-switch></vue-switch>
13+
</div>
614
</div>
715
</div>
816

917
<div class="row">
18+
<div class="col-md-12 mb-2">
19+
<button class="btn btn-primary" @click="reloadTable">
20+
Reload Table
21+
</button>
22+
</div>
1023
<div class="col-md-12">
11-
<reload-the-table-markdown>
12-
</reload-the-table-markdown>
24+
<pre v-highlightjs v-show="code">
25+
<reload-the-table-markdown>
26+
</reload-the-table-markdown>
27+
</pre>
28+
<data-table
29+
ref="reloadingTheTable"
30+
v-show="!code"
31+
:url="url"
32+
:columns="columns">
33+
</data-table>
1334
</div>
1435
</div>
1536
</div>
1637
</template>
1738

1839
<script>
1940
import CodeExample from '../../mixins/CodeExample';
41+
import VueSwitch from '../../components/generic/Switch';
2042
import ReloadTheTableMarkdown from '../../markdown/examples/reloading-the-table.md';
2143
2244
export default {
2345
name: 'Reloading-The-Datatable',
2446
components: {
47+
// eslint-disable-next-line
48+
VueSwitch,
2549
// eslint-disable-next-line
2650
ReloadTheTableMarkdown,
2751
},
2852
mixins: [CodeExample],
53+
data() {
54+
return {
55+
url: process.env.VUE_APP_ELOQUENT_URL,
56+
columns: [
57+
{
58+
label: 'ID',
59+
name: 'id',
60+
orderable: true,
61+
width: 20,
62+
},
63+
{
64+
label: 'Name',
65+
name: 'name',
66+
orderable: true,
67+
width: 40,
68+
},
69+
{
70+
label: 'Email',
71+
name: 'email',
72+
orderable: true,
73+
width: 40,
74+
},
75+
]
76+
}
77+
},
78+
methods: {
79+
reloadTable() {
80+
this.$refs.reloadingTheTable.getData()
81+
}
82+
}
2983
}
3084
</script>

0 commit comments

Comments
 (0)