Skip to content

Commit 6d0c727

Browse files
committed
Merge branch 'master' of github.com:ratiw/vue-table into develop
2 parents 62f84d3 + 1444923 commit 6d0c727

File tree

7 files changed

+19
-12
lines changed

7 files changed

+19
-12
lines changed

README.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,20 @@ vuetable - data table simplify!
1313
- Define row actions and capture the click event to do whatever you want
1414
- Field display customizable via callback function inside Vue.js instance
1515
- Programmatically show/hide any field via reactivity of fields definition
16-
- Use your favorite CSS framework classes to nicely format your table and dispalyed data
16+
- Use your favorite CSS framework classes to nicely format your table and displayed data
1717
- Events to allow control from Vue.js instance programmatically
1818
- Capture events from `vuetable` to manipulate your table and your data
1919
- Should work with any pre-defined JSON data structure
2020
- Should work with any CSS Framework, e.g. Semantic UI, Twitter's Bootstrap
2121
- Optional detail row to display additional data (v.1.2.0)
2222

23+
## Note on vue-resource version
24+
vuetable internally uses vue-resource to request data from the `api-url`. Prior to v1.5.3, vuetable uses vue-resource v0.7.4 and it retrieves the returned data from `response.data` object. However, since [v0.9.0](https://github.com/vuejs/vue-resource/releases/tag/0.9.0) the `response.data` has been renamed to `response.body`. vuetable v1.5.3 onward has been updated to use vue-resource v1.0.2.
25+
26+
This will cause problem with vuetable to display no data because the expected object key is no longer existed and some other related problems as discussed in [#100](https://github.com/ratiw/vue-table/issues/100).
27+
28+
**If you're using vue-resource in your project and the version is 0.9+, please upgrade to use vuetable v1.5.3.**
29+
2330
##Breaking Changes
2431
####v1.5.0
2532
- deprecated props
@@ -198,7 +205,7 @@ Then, reference the vuetable via `<vuetable>` tag as following
198205
'lastname',
199206
'nickname',
200207
'birthdate',
201-
'group.name_en'
208+
'group.name_en',
202209
'gender',
203210
'last_login',
204211
'__actions'

dist/vue-table.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -638,8 +638,8 @@ exports.default = {
638638

639639
var url = this.apiUrl + '?' + this.getAllQueryParams();
640640
this.$http.get(url, this.httpData, this.httpOptions).then(function (response) {
641-
self.tableData = self.getObjectValue(response.data, self.dataPath, null);
642-
self.tablePagination = self.getObjectValue(response.data, self.paginationPath, null);
641+
self.tableData = self.getObjectValue(response.body, self.dataPath, null);
642+
self.tablePagination = self.getObjectValue(response.body, self.paginationPath, null);
643643
if (self.tablePagination === null) {
644644
console.warn('vuetable: pagination-path "' + self.paginationPath + '" not found. ' + 'It looks like the data returned from the sever does not have pagination information ' + 'or you may have set it incorrectly.');
645645
}

dist/vue-table.min.js

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

examples/bootstrap.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ <h4 class="panel-title">Visible fields</h4>
268268
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.12.0/moment-with-locales.min.js"></script>
269269
<script src="https://cdnjs.cloudflare.com/ajax/libs/sweetalert/1.1.3/sweetalert.min.js"></script>
270270
<script src="https://cdnjs.cloudflare.com/ajax/libs/vue/1.0.24/vue.js"></script>
271-
<script src="https://cdnjs.cloudflare.com/ajax/libs/vue-resource/0.7.0/vue-resource.min.js"></script>
271+
<script src="https://cdnjs.cloudflare.com/ajax/libs/vue-resource/1.0.2/vue-resource.min.js"></script>
272272
<script src="../dist/vue-table.js"></script>
273273
<script>
274274
var E_SERVER_ERROR = 'Error communicating with the server'

examples/semantic.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ <h3 class="ui header">List of Users</h3>
194194
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.12.0/moment-with-locales.min.js"></script>
195195
<script src="https://cdnjs.cloudflare.com/ajax/libs/sweetalert/1.1.3/sweetalert.min.js"></script>
196196
<script src="https://cdnjs.cloudflare.com/ajax/libs/vue/1.0.26/vue.js"></script>
197-
<script src="https://cdnjs.cloudflare.com/ajax/libs/vue-resource/0.7.0/vue-resource.min.js"></script>
197+
<script src="https://cdnjs.cloudflare.com/ajax/libs/vue-resource/1.0.2/vue-resource.min.js"></script>
198198
<script src="../dist/vue-table.js"></script>
199199
<script>
200200
$('#settingsModal').modal({

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
22
"name": "vuetable",
3-
"version": "1.5.2",
3+
"version": "1.5.3",
44
"description": "vue.js table component that will automatically request JSON data from server and display them nicely in HTML table with swap-able/extensible pagination component",
55
"main": "dist/vue-table.js",
66
"dependencies": {
7-
"vue": "~1.0.21",
8-
"vue-resource": "~0.7"
7+
"vue": "^1.0.26",
8+
"vue-resource": "^1.0.2"
99
},
1010
"directories": {
1111
"example": "examples"

src/components/Vuetable.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -423,8 +423,8 @@ export default {
423423
var url = this.apiUrl + '?' + this.getAllQueryParams()
424424
this.$http.get(url, this.httpData, this.httpOptions)
425425
.then(function(response) {
426-
self.tableData = self.getObjectValue(response.data, self.dataPath, null)
427-
self.tablePagination = self.getObjectValue(response.data, self.paginationPath, null)
426+
self.tableData = self.getObjectValue(response.body, self.dataPath, null)
427+
self.tablePagination = self.getObjectValue(response.body, self.paginationPath, null)
428428
if (self.tablePagination === null) {
429429
console.warn('vuetable: pagination-path "' + self.paginationPath + '" not found. '
430430
+ 'It looks like the data returned from the sever does not have pagination information '

0 commit comments

Comments
 (0)