Skip to content

Commit

Permalink
fixing built files
Browse files Browse the repository at this point in the history
  • Loading branch information
xaksis committed Aug 4, 2019
1 parent 1dfb0f3 commit 21e045f
Show file tree
Hide file tree
Showing 7 changed files with 84 additions and 76 deletions.
30 changes: 20 additions & 10 deletions dev/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<button @click="resetTable">reset Table</button>
<button @click="hideColumn">hide column</button>
<button @click="setFilter">SetFilter</button>
<button @click="changePage">Change Page</button>
<input type="text" v-model="searchTerm">
<vue-good-table
ref="my-table"
Expand All @@ -18,24 +19,20 @@
:columns="columns"
:rows="rows"
theme="black-rhino"
:pagination-options="{
mode: 'pages',
enabled: true,
perPage: 5,
perPageDropdown: [50, 100, 200, 300, 500, 1000],
}"
:pagination-options="paginationOptions"
:select-options="{
enabled: true,
selectOnCheckboxOnly: true,
}"
styleClass="vgt-table bordered"
:sort-options="{
enabled: true,
initialSortBy: [{field: 'name', type: 'asc'}, {field: 'age', type: 'desc'}],
initialSortBy: [{field: 'name', type: 'asc'}],
}"
:search-options="{
enabled: true,
skipDiacritics: true,
externalQuery: searchTerm,
}">
</vue-good-table>
<h3>Remote Table</h3>
Expand All @@ -53,9 +50,16 @@ export default {
name: 'test',
data() {
return {
currentPage: 1,
selectedIds: [],
rowStyleClass: 'red',
searchTerm: '',
paginationOptions: {
mode: 'pages',
enabled: true,
perPage: 5,
perPageDropdown: [50, 100, 200, 300, 500, 1000],
},
columns: [
{
label: 'Name',
Expand All @@ -64,13 +68,13 @@ export default {
filterOptions: {
enabled: true,
placeholder: 'All',
filterDropdownItems: ['Chris', 'Dan', 'Susan'],
// filterDropdownItems: ['Chris', 'Dan', 'Susan'],
// filterValue: 'Chris',
},
},
{
label: 'Age',
field: 'age',
field: obj => obj.age,
type: 'number',
filterOptions: {
enabled: true,
Expand Down Expand Up @@ -188,6 +192,10 @@ export default {
};
},
methods: {
changePage() {
this.currentPage += 1;
this.$set(this.paginationOptions, 'setCurrentPage', this.currentPage);
},
funcValue(row) {
return row.age + 5;
},
Expand Down Expand Up @@ -240,7 +248,7 @@ export default {
},
setFilter() {
// this.columns[0].filterOptions.filterValue = 'John';
this.$set(this.columns[0].filterOptions, 'filterValue', this.searchTerm);
this.$set(this.columns[0].filterOptions, 'filterValue', 'Chris');
// const column1 = JSON.parse(JSON.stringify(this.columns[0]));
// column1.filterOptions.filterValue = 'John';
// this.$set(this.columns, 0, column1);
Expand Down Expand Up @@ -337,6 +345,8 @@ export default {
onSortChange(params) {
console.log('on-sort-change:');
console.log(params);
const [nameFilter] = params;
console.log(typeof nameFilter.field === 'function');
},
onRowClick(params) {
Expand Down
38 changes: 19 additions & 19 deletions dist/vue-good-table.cjs.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* vue-good-table v2.17.2
* vue-good-table v2.17.4
* (c) 2018-present xaksis <[email protected]>
* https://github.com/xaksis/vue-good-table
* Released under the MIT License.
Expand Down Expand Up @@ -7671,7 +7671,7 @@ var script$1 = {
perPage: {
handler: function handler(newValue, oldValue) {
this.handlePerPage();
this.perPageChanged();
this.perPageChanged(oldValue);
},
immediate: true
},
Expand Down Expand Up @@ -7741,11 +7741,15 @@ var script$1 = {
});
},
// Indicate per page changing
perPageChanged: function perPageChanged() {
perPageChanged: function perPageChanged(oldValue) {
// go back to first page
this.$emit('per-page-changed', {
currentPerPage: this.currentPerPage
});
if (oldValue) {
//* only emit if this isn't first initialization
this.$emit('per-page-changed', {
currentPerPage: this.currentPerPage
});
}

this.changePage(1, false);
},
// Handle per page changing
Expand Down Expand Up @@ -8040,9 +8044,7 @@ var script$3 = {
watch: {
columns: {
handler: function handler(newValue, oldValue) {
if (!lodash_isequal(newValue, oldValue)) {
this.populateInitialFilters();
}
this.populateInitialFilters();
},
deep: true,
immediate: true
Expand Down Expand Up @@ -8128,16 +8130,17 @@ var script$3 = {

if (this.isFilterable(col) && typeof col.filterOptions.filterValue !== 'undefined' && col.filterOptions.filterValue !== null) {
this.$set(this.columnFilters, col.field, col.filterOptions.filterValue); // this.updateFilters(col, col.filterOptions.filterValue);

this.$set(col.filterOptions, 'filterValue', undefined);
// this.$set(col.filterOptions, 'filterValue', undefined);
}
} //* lets emit event once all filters are set


this.$emit('filter-changed', this.columnFilters);
}
},
mounted: function mounted() {}
mounted: function mounted() {
console.log(this.columns);
}
};

/* script */
Expand Down Expand Up @@ -8230,7 +8233,7 @@ var __vue_staticRenderFns__$3 = [];
var __vue_inject_styles__$3 = undefined;
/* scoped */

var __vue_scope_id__$3 = "data-v-892cc66c";
var __vue_scope_id__$3 = "data-v-74c08ac1";
/* module identifier */

var __vue_module_identifier__$3 = undefined;
Expand Down Expand Up @@ -11578,9 +11581,7 @@ var script$6 = {
},
paginationOptions: {
handler: function handler(newValue, oldValue) {
if (!lodash_isequal(newValue, oldValue)) {
this.initializePagination();
}
this.initializePagination();
},
deep: true,
immediate: true
Expand All @@ -11600,9 +11601,8 @@ var script$6 = {
},
sortOptions: {
handler: function handler(newValue, oldValue) {
if (!lodash_isequal(newValue, oldValue)) {
this.initializeSort();
}
// if (!isEqual(newValue, oldValue)) {
this.initializeSort(); // }
},
deep: true
},
Expand Down
38 changes: 19 additions & 19 deletions dist/vue-good-table.esm.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* vue-good-table v2.17.2
* vue-good-table v2.17.4
* (c) 2018-present xaksis <[email protected]>
* https://github.com/xaksis/vue-good-table
* Released under the MIT License.
Expand Down Expand Up @@ -7667,7 +7667,7 @@ var script$1 = {
perPage: {
handler: function handler(newValue, oldValue) {
this.handlePerPage();
this.perPageChanged();
this.perPageChanged(oldValue);
},
immediate: true
},
Expand Down Expand Up @@ -7737,11 +7737,15 @@ var script$1 = {
});
},
// Indicate per page changing
perPageChanged: function perPageChanged() {
perPageChanged: function perPageChanged(oldValue) {
// go back to first page
this.$emit('per-page-changed', {
currentPerPage: this.currentPerPage
});
if (oldValue) {
//* only emit if this isn't first initialization
this.$emit('per-page-changed', {
currentPerPage: this.currentPerPage
});
}

this.changePage(1, false);
},
// Handle per page changing
Expand Down Expand Up @@ -8036,9 +8040,7 @@ var script$3 = {
watch: {
columns: {
handler: function handler(newValue, oldValue) {
if (!lodash_isequal(newValue, oldValue)) {
this.populateInitialFilters();
}
this.populateInitialFilters();
},
deep: true,
immediate: true
Expand Down Expand Up @@ -8124,16 +8126,17 @@ var script$3 = {

if (this.isFilterable(col) && typeof col.filterOptions.filterValue !== 'undefined' && col.filterOptions.filterValue !== null) {
this.$set(this.columnFilters, col.field, col.filterOptions.filterValue); // this.updateFilters(col, col.filterOptions.filterValue);

this.$set(col.filterOptions, 'filterValue', undefined);
// this.$set(col.filterOptions, 'filterValue', undefined);
}
} //* lets emit event once all filters are set


this.$emit('filter-changed', this.columnFilters);
}
},
mounted: function mounted() {}
mounted: function mounted() {
console.log(this.columns);
}
};

/* script */
Expand Down Expand Up @@ -8226,7 +8229,7 @@ var __vue_staticRenderFns__$3 = [];
var __vue_inject_styles__$3 = undefined;
/* scoped */

var __vue_scope_id__$3 = "data-v-892cc66c";
var __vue_scope_id__$3 = "data-v-74c08ac1";
/* module identifier */

var __vue_module_identifier__$3 = undefined;
Expand Down Expand Up @@ -11574,9 +11577,7 @@ var script$6 = {
},
paginationOptions: {
handler: function handler(newValue, oldValue) {
if (!lodash_isequal(newValue, oldValue)) {
this.initializePagination();
}
this.initializePagination();
},
deep: true,
immediate: true
Expand All @@ -11596,9 +11597,8 @@ var script$6 = {
},
sortOptions: {
handler: function handler(newValue, oldValue) {
if (!lodash_isequal(newValue, oldValue)) {
this.initializeSort();
}
// if (!isEqual(newValue, oldValue)) {
this.initializeSort(); // }
},
deep: true
},
Expand Down
38 changes: 19 additions & 19 deletions dist/vue-good-table.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* vue-good-table v2.17.2
* vue-good-table v2.17.4
* (c) 2018-present xaksis <[email protected]>
* https://github.com/xaksis/vue-good-table
* Released under the MIT License.
Expand Down Expand Up @@ -7673,7 +7673,7 @@
perPage: {
handler: function handler(newValue, oldValue) {
this.handlePerPage();
this.perPageChanged();
this.perPageChanged(oldValue);
},
immediate: true
},
Expand Down Expand Up @@ -7743,11 +7743,15 @@
});
},
// Indicate per page changing
perPageChanged: function perPageChanged() {
perPageChanged: function perPageChanged(oldValue) {
// go back to first page
this.$emit('per-page-changed', {
currentPerPage: this.currentPerPage
});
if (oldValue) {
//* only emit if this isn't first initialization
this.$emit('per-page-changed', {
currentPerPage: this.currentPerPage
});
}

this.changePage(1, false);
},
// Handle per page changing
Expand Down Expand Up @@ -8042,9 +8046,7 @@
watch: {
columns: {
handler: function handler(newValue, oldValue) {
if (!lodash_isequal(newValue, oldValue)) {
this.populateInitialFilters();
}
this.populateInitialFilters();
},
deep: true,
immediate: true
Expand Down Expand Up @@ -8130,16 +8132,17 @@

if (this.isFilterable(col) && typeof col.filterOptions.filterValue !== 'undefined' && col.filterOptions.filterValue !== null) {
this.$set(this.columnFilters, col.field, col.filterOptions.filterValue); // this.updateFilters(col, col.filterOptions.filterValue);

this.$set(col.filterOptions, 'filterValue', undefined);
// this.$set(col.filterOptions, 'filterValue', undefined);
}
} //* lets emit event once all filters are set


this.$emit('filter-changed', this.columnFilters);
}
},
mounted: function mounted() {}
mounted: function mounted() {
console.log(this.columns);
}
};

/* script */
Expand Down Expand Up @@ -8232,7 +8235,7 @@
var __vue_inject_styles__$3 = undefined;
/* scoped */

var __vue_scope_id__$3 = "data-v-892cc66c";
var __vue_scope_id__$3 = "data-v-74c08ac1";
/* module identifier */

var __vue_module_identifier__$3 = undefined;
Expand Down Expand Up @@ -11580,9 +11583,7 @@
},
paginationOptions: {
handler: function handler(newValue, oldValue) {
if (!lodash_isequal(newValue, oldValue)) {
this.initializePagination();
}
this.initializePagination();
},
deep: true,
immediate: true
Expand All @@ -11602,9 +11603,8 @@
},
sortOptions: {
handler: function handler(newValue, oldValue) {
if (!lodash_isequal(newValue, oldValue)) {
this.initializeSort();
}
// if (!isEqual(newValue, oldValue)) {
this.initializeSort(); // }
},
deep: true
},
Expand Down
Loading

0 comments on commit 21e045f

Please sign in to comment.