Skip to content

Commit

Permalink
#19 - release 1.1.13
Browse files Browse the repository at this point in the history
  • Loading branch information
syshex committed Aug 24, 2018
1 parent 95ab0cc commit 3e74032
Show file tree
Hide file tree
Showing 8 changed files with 42 additions and 25 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

### 1.1.13 (August 24, 2018)

* #19 - Disable filter for specific columns

### 1.1.12

* Enhancement - exposed methods.
Expand Down
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ Or add the js script to your html (download from [releases](https://github.com/j
title:"name",
visible: true,
editable: true,
filterable: false
},
{
title:"age",
Expand Down Expand Up @@ -267,6 +268,7 @@ The `columns` array takes object of type:
cellstyle: String // Optional: styles to be applied to the Cells of this column
renderfunction: Function // Optional: Function that receives as input the column name and entry, and returns an HTML String for drawing cell
sortable: Boolean // Optional, by default it is true! Used to set particular columns as not sortable, in case the table is sortable itself. - From 1.1.12
filterable: Boolean // Optional, by default it is true! Used to exclude columns from the filtering process. - From 1.1.13
}
```

Expand Down Expand Up @@ -533,6 +535,10 @@ If you have a feature request, please add it as an issue or make a pull request.

## Changelog

### 1.1.13

* #19 - Disable filter for specific columns

### 1.1.12

* Enhancement - exposed methods.
Expand Down
22 changes: 12 additions & 10 deletions dist/vue-bootstrap-table.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/vue-bootstrap-table.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/vue-bootstrap-table.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vue2-bootstrap-table2",
"version": "1.1.12",
"version": "1.1.13",
"description": "A sortable and searchable vue table, as a Vue component, using bootstrap styling.",
"keywords": [
"table",
Expand Down
24 changes: 14 additions & 10 deletions src/VueBootstrapTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -530,20 +530,20 @@
});
} else {
var result = this.rawValues.filter(item => {
var good = false;
for (var col in self.displayColsVisible) {
if (self.filterCaseSensitive) {
if (lodashincludes(item[self.displayColsVisible[col].name] + "", self.filterKey + "")) {
good = true;
}
} else {
if (lodashincludes((item[self.displayColsVisible[col].name] + "").toLowerCase(), (self.filterKey + "").toLowerCase())) {
good = true;
if (self.displayColsVisible[col].filterable) {
if (self.filterCaseSensitive) {
if (lodashincludes(item[self.displayColsVisible[col].name] + "", self.filterKey + "")) {
return true;
}
} else {
if (lodashincludes((item[self.displayColsVisible[col].name] + "").toLowerCase(), (self.filterKey + "").toLowerCase())) {
return true;
}
}
}
}
return good;
return false;
});
var tColsDir = [];
Expand Down Expand Up @@ -698,6 +698,10 @@
obj.sortable = column.sortable;
else
obj.sortable = true;
if ( typeof column.filterable !== "undefined")
obj.filterable = column.filterable;
else
obj.filterable = true;
return obj;
},
Expand Down
5 changes: 3 additions & 2 deletions src/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ new Vue({
handleRowFunction: handleRow,
columnToSortBy:"name",
ajax: {
enabled: true,
enabled: false,
url: "http://172.16.213.1:9430/data/test",
method: "POST",
delegate: true
Expand All @@ -37,7 +37,8 @@ new Vue({
},
{
title: 'Name',
name: 'name'
name: 'name' ,
filterable: false
},
{
title: 'Description',
Expand Down

0 comments on commit 3e74032

Please sign in to comment.