浏览代码

Update changelog and fix bug

zhixin 6 年之前
父节点
当前提交
550d839e9e
共有 3 个文件被更改,包括 34 次插入10 次删除
  1. 24 0
      CHANGELOG.md
  2. 5 5
      site/docs/api/table-options.md
  3. 5 5
      src/bootstrap-table.js

+ 24 - 0
CHANGELOG.md

@@ -1,6 +1,30 @@
 ChangeLog
 ---------
 
+### 1.15.0
+
+- **New(js):** Added support comparisons search(<, >, <=, =<, >=, =>).
+- **New(js):** Added `detailViewByClick` table option.
+- **New(js):** Added `showExtendedPagination` table option.
+- **New(js):** Added `totalNotFilteredField` table option.
+- **New(js):** Added `detailFormatter` column option.
+- **New(js):** Improved `filterBy` method with `or` condition and custom filter algorithm.
+- **New(js):** Improved `showColumn` and `hideColumn` methods with array of fields.
+- **New(js):** Improved scrollTo function to allow `rows` units.
+- **New(js):** Added `onPostFooter`(`post-footer.bs.table`) event.
+- **New(cell-input extension):** Added cell-input extension.
+- **Update(js):** Improved `pageList` options to support localization.
+- **Update(js):** Fixed `smartDisplay` option pagination bug.
+- **Update(js):** Set the `totalRows` option always.
+- **Update(js):** Fixed toolbar dropdown button border bug.
+- **Update(js):** Improved table footer.
+- **Update(js):** Fixed data-* attribute is an object bug.
+- **Update(filter-control extension):** Fixed DatePicker of filter-control does not work bug.
+- **Update(multiple-sort extension):** Fixed multiple-sort does not work with data-query-params bug.
+- **Update(editable extension):** Updated parameters of `onEditableSave` to `field, row, rowIndex, oldValue, $el`.
+- **Update(editable extension):** Fixed editable rerender bug after saving data.
+- **Update(treegrid extension):** Fixed treegrid cannot work bug.
+
 ### 1.14.2
 
 - **New(fixed-columns extension):** Added new version fixed-columns extension.

+ 5 - 5
site/docs/api/table-options.md

@@ -736,13 +736,13 @@ The table options are defined in `jQuery.fn.bootstrapTable.defaults`.
 - **Detail:**
 
   Enable the search input.
-  
+
   There are 3 ways to search:
-  - The value contains the search query (Default).   
+  - The value contains the search query (Default).
     Example: Github contains git.
-  - The value must be identical to the search query.  
+  - The value must be identical to the search query.
     Example: Github (value) and Github (search query).
-  - Comparsions (<, >, <=, =<, >=, =>)   
+  - Comparisons (<, >, <=, =<, >=, =>)
     Example: 4 is larger than 3.
 
 - **Default:** `false`
@@ -771,7 +771,7 @@ The table options are defined in `jQuery.fn.bootstrapTable.defaults`.
 
 - **Detail:**
 
-  Enable the strict search.   
+  Enable the strict search.
   Disables the comparison checks.
 
 - **Default:** `false`

+ 5 - 5
src/bootstrap-table.js

@@ -1369,7 +1369,7 @@
     }
 
     initSearch () {
-      this.filterOptions = this.options.filterOptions || this.options.filterOptions
+      this.filterOptions = this.filterOptions || this.options.filterOptions
       if (this.options.sidePagination !== 'server') {
         if (this.options.customSearch) {
           this.data = Utils.calculateObjectValue(this.options, this.options.customSearch,
@@ -1382,13 +1382,13 @@
         const f = Utils.isEmptyObject(this.filterColumns) ? null : this.filterColumns
 
         // Check filter
-        if (typeof this.options.filterOptions.filterAlgorithm === 'function') {
+        if (typeof this.filterOptions.filterAlgorithm === 'function') {
           this.data = this.options.data.filter((item, i) => {
-            return this.options.filterOptions.filterAlgorithm.apply(null, [item, f])
+            return this.filterOptions.filterAlgorithm.apply(null, [item, f])
           })
-        } else if (typeof this.options.filterOptions.filterAlgorithm === 'string') {
+        } else if (typeof this.filterOptions.filterAlgorithm === 'string') {
           this.data = f ? this.options.data.filter((item, i) => {
-            const filterAlgorithm = this.options.filterOptions.filterAlgorithm
+            const filterAlgorithm = this.filterOptions.filterAlgorithm
             if (filterAlgorithm === 'and') {
               for (const key in f) {
                 if (