浏览代码

Fixed showCustomView option cannot work

zhixin 3 年之前
父节点
当前提交
d5bca54d80
共有 3 个文件被更改,包括 9 次插入2 次删除
  1. 1 1
      .github/PULL_REQUEST_TEMPLATE.md
  2. 6 0
      CHANGELOG.md
  3. 2 1
      src/extensions/custom-view/bootstrap-table-custom-view.js

+ 1 - 1
.github/PULL_REQUEST_TEMPLATE.md

@@ -22,7 +22,7 @@
 
 **☑️Self Check before Merge**
 
-⚠️ Please check all items below before review. ⚠️
+⚠️ Please check all items below before reviewing. ⚠️
 
 - [ ] Doc is updated/provided or not needed
 - [ ] Demo is updated/provided or not needed

+ 6 - 0
CHANGELOG.md

@@ -1,6 +1,12 @@
 ChangeLog
 ---------
 
+### 1.21.2
+
+#### Extensions
+
+- **Update(custom-view):** Fixed `showCustomView` option cannot work.
+
 ### 1.21.1
 
 #### Core

+ 2 - 1
src/extensions/custom-view/bootstrap-table-custom-view.js

@@ -7,6 +7,7 @@ const Utils = $.fn.bootstrapTable.utils
 
 $.extend($.fn.bootstrapTable.defaults, {
   customView: false,
+  showCustomView: false,
   customViewDefaultView: false
 })
 
@@ -54,7 +55,7 @@ $.BootstrapTable = class extends $.BootstrapTable {
   }
 
   initToolbar (...args) {
-    if (this.options.customView) {
+    if (this.options.customView && this.options.showCustomView) {
       this.buttons = Object.assign(this.buttons, {
         customView: {
           text: this.options.formatToggleCustomView(),