From 4ba628e2d0bbdb1745c8c2a2df94715914826bfb Mon Sep 17 00:00:00 2001 From: Thomas Schiavello Date: Tue, 3 Sep 2019 09:21:05 +0200 Subject: [PATCH] bugfix --- src/Template/Element/templates.ctp | 4 ++-- webroot/css/datatable.css | 1 + webroot/js/components.js | 4 +++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/Template/Element/templates.ctp b/src/Template/Element/templates.ctp index 3db51b7..96622ae 100644 --- a/src/Template/Element/templates.ctp +++ b/src/Template/Element/templates.ctp @@ -209,10 +209,10 @@ diff --git a/webroot/css/datatable.css b/webroot/css/datatable.css index 0293658..4e13ff1 100644 --- a/webroot/css/datatable.css +++ b/webroot/css/datatable.css @@ -44,6 +44,7 @@ .datatable thead th .select2-container { width:100%!important; + position:relative!important; } diff --git a/webroot/js/components.js b/webroot/js/components.js index 9ec3e04..e1fd775 100644 --- a/webroot/js/components.js +++ b/webroot/js/components.js @@ -123,6 +123,7 @@ Vue.component('datatable', { }, filter: function() { this.current_filters = {}; + this.current_page = 1; if(this.$refs.filter) { for(filter of this.$refs.filter) { this.current_filters[filter.column] = filter.getFilterValue(); @@ -334,7 +335,7 @@ Vue.component('selectFilter', { return $(this.$refs.value).val(); }, reset: function() { - $(this.$refs.value).val(''); + $(this.$refs.value).val('').change(); } }, mounted: function() { @@ -342,6 +343,7 @@ Vue.component('selectFilter', { setTimeout(function() { $(that.$refs.value).select2(); }, 0); + }, updated: function() { var that = this;