From 5ad2017edfac792eab35a0b1abf250fd09c43c31 Mon Sep 17 00:00:00 2001 From: freek Date: Wed, 9 Aug 2017 11:52:05 +0200 Subject: [PATCH] add refresh method --- package.json | 2 +- src/components/TableComponent.vue | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 210a9a6..516a43e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "vue-table-component", - "version": "1.4.0-rc.1", + "version": "1.4.0-rc.2", "description": "A straightforward Vue component to filter and sort tables", "main": "dist/index.js", "jsnext:main": "src/index.js", diff --git a/src/components/TableComponent.vue b/src/components/TableComponent.vue index 67e9fa4..99a0dc5 100644 --- a/src/components/TableComponent.vue +++ b/src/components/TableComponent.vue @@ -199,8 +199,6 @@ await this.mapDataToRows(); }, - - async mapDataToRows() { const data = this.usesLocalData ? this.prepareLocalData() @@ -237,6 +235,10 @@ return response.data; }, + async refresh() { + await this.mapDataToRows(); + }, + changeSorting(column) { if (this.sort.fieldName !== column.show) { this.sort.fieldName = column.show;