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

Commit

Permalink
0.5.8 Bugfix, corrected issue with reloading the table
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesdordoy committed Mar 8, 2020
1 parent c11f6f5 commit 10e629d
Show file tree
Hide file tree
Showing 7 changed files with 64 additions and 10 deletions.
2 changes: 1 addition & 1 deletion docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@
);
}
}
}(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>
}(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>
4 changes: 2 additions & 2 deletions docs/js/app.2a3b1e61.js → docs/js/app.13e15f85.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions docs/js/app.13e15f85.js.map

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion docs/js/app.2a3b1e61.js.map

This file was deleted.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "laravel-vue-datatable",
"version": "0.5.7",
"version": "0.5.8",
"description": "Vue.js datatable made with Laravel and Bootstrap in mind",
"author": "James Dordoy <[email protected]>",
"homepage": "https://jamesdordoy.github.io/laravel-vue-datatable/",
Expand Down
2 changes: 1 addition & 1 deletion src/components/DataTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ export default {
};
},
methods: {
getData(url = this.url, options = {}) {
getData(url = this.url, options = this.getRequestPayload) {
url = this.checkUrlForPagination(url);
Expand Down
62 changes: 58 additions & 4 deletions src/views/examples/ReloadingTheTable.vue
Original file line number Diff line number Diff line change
@@ -1,30 +1,84 @@
<template>
<div>
<div class="row">
<div class="col-md-12">
<h2 class="markdown-header">Reloading the Datatable</h2>
<div class="col-md-8">
<h2 class="markdown-header">
Reloading the Datatable
</h2>
</div>
<div class="col-md-4 relative">
<div class="show-code-inline">
<label>Show Example Code</label>&nbsp;
<vue-switch></vue-switch>
</div>
</div>
</div>

<div class="row">
<div class="col-md-12 mb-2">
<button class="btn btn-primary" @click="reloadTable">
Reload Table
</button>
</div>
<div class="col-md-12">
<reload-the-table-markdown>
</reload-the-table-markdown>
<pre v-highlightjs v-show="code">
<reload-the-table-markdown>
</reload-the-table-markdown>
</pre>
<data-table
ref="reloadingTheTable"
v-show="!code"
:url="url"
:columns="columns">
</data-table>
</div>
</div>
</div>
</template>

<script>
import CodeExample from '../../mixins/CodeExample';
import VueSwitch from '../../components/generic/Switch';
import ReloadTheTableMarkdown from '../../markdown/examples/reloading-the-table.md';
export default {
name: 'Reloading-The-Datatable',
components: {
// eslint-disable-next-line
VueSwitch,
// eslint-disable-next-line
ReloadTheTableMarkdown,
},
mixins: [CodeExample],
data() {
return {
url: process.env.VUE_APP_ELOQUENT_URL,
columns: [
{
label: 'ID',
name: 'id',
orderable: true,
width: 20,
},
{
label: 'Name',
name: 'name',
orderable: true,
width: 40,
},
{
label: 'Email',
name: 'email',
orderable: true,
width: 40,
},
]
}
},
methods: {
reloadTable() {
this.$refs.reloadingTheTable.getData()
}
}
}
</script>

0 comments on commit 10e629d

Please sign in to comment.