Browse Source

Merge branch 'develop' into docs/5898

Dennis Hernández 4 years ago
parent
commit
a4fed30cb2

+ 2 - 7
.github/ISSUE_TEMPLATE/4_Documentation.yaml

@@ -1,13 +1,8 @@
-name: ⛔ Documentation & Examples
-description: Issues with the Documentation and/or the Examples
+name: ⛔ Documentation
+description: Issues with the Documentation
 labels: docs
 labels: docs
 
 
 body:
 body:
-  - type: markdown
-    attributes:
-      value: |
-        We have our own dedicated repository for the examples. Please open your
-        documentation-related issue at https://github.com/wenzhixin/bootstrap-table-examples
   - type: textarea
   - type: textarea
     id: description
     id: description
     attributes:
     attributes:

+ 5 - 0
.github/ISSUE_TEMPLATE/config.yml

@@ -0,0 +1,5 @@
+blank_issues_enabled: false
+contact_links:
+  - name: 📖 Example Issue
+    url: https://github.com/wenzhixin/bootstrap-table-examples
+    about: Please refer to our examples repository for example issues

+ 2 - 1
src/bootstrap-table.js

@@ -1596,9 +1596,10 @@ class BootstrapTable {
 
 
         if (isHTML) {
         if (isHTML) {
           // value can contains a HTML tags
           // value can contains a HTML tags
-          const textContent = new DOMParser().parseFromString(value.toString(), 'text/html').documentElement.textContent
+          let textContent = new DOMParser().parseFromString(value.toString(), 'text/html').documentElement.textContent
           const textReplaced = textContent.replace(regExp, marker)
           const textReplaced = textContent.replace(regExp, marker)
 
 
+          textContent = textContent.replace(/[.*+?^${}()|[\]\\]/g, '\\$&')
           defValue = value.replace(new RegExp(`(>\\s*)(${textContent})(\\s*)`, 'gm'), `$1${textReplaced}$3`)
           defValue = value.replace(new RegExp(`(>\\s*)(${textContent})(\\s*)`, 'gm'), `$1${textReplaced}$3`)
         } else {
         } else {
           // but usually not
           // but usually not

+ 7 - 1
src/extensions/export/bootstrap-table-export.js

@@ -149,7 +149,13 @@ $.BootstrapTable = class extends $.BootstrapTable {
     }
     }
 
 
     this.updateExportButton()
     this.updateExportButton()
-    this.$export.find('[data-type]').click(e => {
+    let $exportButtons = this.$export.find('[data-type]')
+
+    if (exportTypes.length === 1) {
+      $exportButtons = this.$export.find('button')
+    }
+
+    $exportButtons.click(e => {
       e.preventDefault()
       e.preventDefault()
 
 
       const type = $(e.currentTarget).data('type')
       const type = $(e.currentTarget).data('type')

+ 1 - 1
src/extensions/filter-control/utils.js

@@ -355,7 +355,7 @@ export function createControls (that, header) {
 
 
       if ($th.data('field') === column.field) {
       if ($th.data('field') === column.field) {
         $th.find('.filter-control').remove()
         $th.find('.filter-control').remove()
-        $th.find('.fht-cell').append(html.join(''))
+        $th.find('.fht-cell').html(html.join(''))
         return false
         return false
       }
       }
     })
     })