Browse Source

Merge pull request #6426 from wenzhixin/fix/6373

Fixed showCustomView option cannot work
Dustin Utecht 3 years ago
parent
commit
d0ce68691c

+ 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(),

+ 1 - 1
src/themes/_theme.scss

@@ -391,5 +391,5 @@ div.fixed-table-scroll-outer {
 @keyframes loading {
   0% { opacity: 0; }
   50% { opacity: 1; }
-  to { opacity: 0; }
+  100% { opacity: 0; }
 }