Skip to content

Commit

Permalink
bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas Schiavello committed Sep 3, 2019
1 parent 80432c6 commit 4ba628e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/Template/Element/templates.ctp
Original file line number Diff line number Diff line change
Expand Up @@ -209,10 +209,10 @@
<template id="range-filter-template">
<div class="range-filter">
<div>
<input :type="getFieldType()" class="form-control" :placeholder="'filtra da ' + getColumnName()" ref="from" />
Da <input :type="getFieldType()" class="form-control" :placeholder="'filtra da ' + getColumnName()" ref="from" />
</div>
<div>
<input :type="getFieldType()" class="form-control" :placeholder="'filtra a ' + getColumnName()" ref="to" />
A<input :type="getFieldType()" class="form-control" :placeholder="'filtra a ' + getColumnName()" ref="to" />
</div>
</div>
</template>
Expand Down
1 change: 1 addition & 0 deletions webroot/css/datatable.css
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@

.datatable thead th .select2-container {
width:100%!important;
position:relative!important;
}


Expand Down
4 changes: 3 additions & 1 deletion webroot/js/components.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -334,14 +335,15 @@ Vue.component('selectFilter', {
return $(this.$refs.value).val();
},
reset: function() {
$(this.$refs.value).val('');
$(this.$refs.value).val('').change();
}
},
mounted: function() {
var that = this;
setTimeout(function() {
$(that.$refs.value).select2();
}, 0);

},
updated: function() {
var that = this;
Expand Down

0 comments on commit 4ba628e

Please sign in to comment.