浏览代码

Updated the docs API sort by alphabetical

zhixin 5 年之前
父节点
当前提交
173aaf0a62
共有 6 个文件被更改,包括 1319 次插入1312 次删除
  1. 202 200
      site/docs/api/column-options.md
  2. 145 145
      site/docs/api/events.md
  3. 41 41
      site/docs/api/localizations.md
  4. 269 269
      site/docs/api/methods.md
  5. 657 657
      site/docs/api/table-options.md
  6. 5 0
      tools/check-api.js

+ 202 - 200
site/docs/api/column-options.md

@@ -8,103 +8,113 @@ toc: true
 
 The column options is defined in `jQuery.fn.bootstrapTable.columnDefaults`.
 
-## field
+## align
 
-- **Attribute:** `data-field`
+- **Attribute:** `data-align`
 
 - **Type:** `String`
 
 - **Detail:**
 
-  The column field name. This field must be unique, or some unknown problems may occur.
+  Indicate how to align the column data. `'left'`, `'right'`, `'center'` can be used.
 
 - **Default:** `undefined`
 
-- **Example:** [Column Field](https://examples.bootstrap-table.com/#column-options/field.html)
+- **Example:** [Aligning Columns](https://examples.bootstrap-table.com/#column-options/aligning-columns.html)
 
-## title
+## cardVisible
 
-- **Attribute:** `data-title`
+- **Attribute:** `data-card-visible`
 
-- **Type:** `String`
+- **Type:** `Boolean`
 
 - **Detail:**
 
-  The column title text.
+  Set `false` to hide the columns item in card view state.
 
-- **Default:** `undefined`
+- **Default:** `true`
 
-- **Example:** [Column Title](https://examples.bootstrap-table.com/#column-options/title.html)
+- **Example:** [Card Visible](https://examples.bootstrap-table.com/#column-options/card-visible.html)
 
-## titleTooltip
+## cellStyle
 
-- **Attribute:** `data-title-tooltip`
+- **Attribute:** `data-cell-style`
 
-- **Type:** `String`
+- **Type:** `Function`
 
 - **Detail:**
 
-  The column title tooltip text. This option also support the title HTML attribute.
+  The cell style formatter function, take four parameters:
+
+  * `value`: the field value.
+  * `row`: the row record data.
+  * `index`: the row index.
+  * `field`: the row field.
+
+  Support classes or css.
 
 - **Default:** `undefined`
 
-- **Example:** [Title Tooltip](https://examples.bootstrap-table.com/#column-options/title-tooltip.html)
+- **Example:** [Cell Style](https://examples.bootstrap-table.com/#column-options/cell-style.html)
 
-## class
+## checkbox
 
-- **Attribute:** `class | data-class`
+- **Attribute:** `data-checkbox`
 
-- **Type:** `String`
+- **Type:** `Boolean`
 
 - **Detail:**
 
-  The column class name.
+  Set `true` to show a checkbox. The checkbox column has fixed width.
 
-- **Default:** `undefined`
+  If a value is given the Checkbox is automatically checked.
+  Its also possible to check/uncheck the checkbox by use an formatter (return `true` to check, return `false` to uncheck).
 
-- **Example:** [Column Class](https://examples.bootstrap-table.com/#column-options/class.html)
+- **Default:** `false`
 
-## width
+- **Example:** [Column Checkbox](https://examples.bootstrap-table.com/#column-options/checkbox.html)
 
-- **Attribute:** `data-width`
+## checkboxEnabled
 
-- **Type:** `Number`
+- **Attribute:** `data-checkbox-enabled`
+
+- **Type:** `Boolean`
 
 - **Detail:**
 
-  The width of column. If not defined, the width will auto expand to fit its contents. Though if the table is left responsive and sized too small this `'width'` might be ignored (use min/max-width via class or such then). The default used Unit is 'px', use `widthUnit` to change it!
+  Set `false` to disable the the checkboxes/radioboxes.
 
-- **Default:** `undefined`
+- **Default:** `true`
 
-- **Example:** [Column Width](https://examples.bootstrap-table.com/#column-options/width.html)
+- **Example:** [Checkbox Enabled](https://examples.bootstrap-table.com/#column-options/checkbox-enabled.html) and [Checkbox Disabled](https://examples.bootstrap-table.com/#column-options/checkbox-disabled.html)
 
-## widthUnit
+## class
 
-- **Attribute:** `data-width-unit`
+- **Attribute:** `class | data-class`
 
 - **Type:** `String`
 
 - **Detail:**
 
-  Defines the unit which is used for the option `width`.
+  The column class name.
 
-- **Default:** `px`
+- **Default:** `undefined`
 
-- **Example:** [Width Unit](https://examples.bootstrap-table.com/#column-options/width-unit.html)
+- **Example:** [Column Class](https://examples.bootstrap-table.com/#column-options/class.html)
 
-## rowspan
+## clickToSelect
 
-- **Attribute:** `rowspan | data-rowspan`
+- **Attribute:** `data-click-to-select`
 
-- **Type:** `Number`
+- **Type:** `Boolean`
 
 - **Detail:**
 
-  Indicate how many rows a cell should take up.
+  Set `true` to select checkbox or radiobox when clicking rows.
 
-- **Default:** `undefined`
+- **Default:** `false`
 
-- **Example:** [Rowspan Colspan](https://examples.bootstrap-table.com/#column-options/rowspan-colspan.html)
+- **Example:** [Click to Select](https://examples.bootstrap-table.com/#column-options/click-to-select.html)
 
 ## colspan
 
@@ -120,34 +130,63 @@ The column options is defined in `jQuery.fn.bootstrapTable.columnDefaults`.
 
 - **Example:** [Rowspan Colspan](https://examples.bootstrap-table.com/#column-options/rowspan-colspan.html)
 
-## align
+## detailFormatter
 
-- **Attribute:** `data-align`
+- **Attribute:** `data-detail-formatter`
 
-- **Type:** `String`
+- **Type:** `Function`
 
 - **Detail:**
 
-  Indicate how to align the column data. `'left'`, `'right'`, `'center'` can be used.
+  Format your detail view when `detailView` and `detailViewByClick` is set to `true`. Return a `String` and it will be appended into the detail view cell, optionally render the element directly using the third parameter which is a jQuery element of the target cell.
 
-- **Default:** `undefined`
+  Fallback is the detail-formatter of the table.
 
-- **Example:** [Aligning Columns](https://examples.bootstrap-table.com/#column-options/aligning-columns.html)
+- **Default:** `function(index, row, $element) { return '' }`
 
-## halign
+- **Example:** [Detail Formatter](https://examples.bootstrap-table.com/#column-options/detail-formatter.html)
 
-- **Attribute:** `data-halign`
+## escape
 
-- **Type:** `String`
+- **Attribute:** `data-escape`
+
+- **Type:** `Boolean`
 
 - **Detail:**
 
-  Indicate how to align the table header. `'left'`, `'right'`, `'center'` can be used.
+  Escapes a string for insertion into HTML, replacing &, <, >, ", \`, and ' characters.
 
-- **Default:** `undefined`
+- **Default:** `false`
 
-- **Example:** [Aligning Columns](https://examples.bootstrap-table.com/#column-options/aligning-columns.html)
+- **Example:** [Column Escape](https://examples.bootstrap-table.com/#column-options/escape.html)
+
+## events
+
+- **Attribute:** `data-events`
+
+- **Type:** `Object`
+
+- **Detail:**
+
+  The cell events listener when you use formatter function, take four parameters:
+
+  * `event`: the jQuery event.
+  * `value`: the field value.
+  * `row`: the row record data.
+  * `index`: the row index.
+
+  Example code:
 
+   {% highlight html %}
+  <th .. data-events="operateEvent">
+  var operateEvents = {
+    'click .like': function (e, value, row, index) {}
+  }
+  {% endhighlight %}
+
+- **Default:** `undefined`
+
+- **Example:** [Column Events](https://examples.bootstrap-table.com/#column-options/events.html)
 ## falign
 
 - **Attribute:** `data-falign`
@@ -162,40 +201,88 @@ The column options is defined in `jQuery.fn.bootstrapTable.columnDefaults`.
 
 - **Example:** [Aligning Footer](https://examples.bootstrap-table.com/#column-options/aligning-footer.html)
 
-## valign
+## field
 
-- **Attribute:** `data-valign`
+- **Attribute:** `data-field`
 
 - **Type:** `String`
 
 - **Detail:**
 
-  Indicate how to align the cell data. `'top'`, `'middle'`, `'bottom'` can be used.
+  The column field name. This field must be unique, or some unknown problems may occur.
 
 - **Default:** `undefined`
 
-- **Example:** [Aligning Columns](https://examples.bootstrap-table.com/#column-options/aligning-columns.html)
+- **Example:** [Column Field](https://examples.bootstrap-table.com/#column-options/field.html)
 
-## cellStyle
+## footerFormatter
 
-- **Attribute:** `data-cell-style`
+- **Attribute:** `data-footer-formatter`
 
 - **Type:** `Function`
 
 - **Detail:**
 
-  The cell style formatter function, take four parameters:
+  The context (this) is the column Object.
+
+  The function, take one parameter:
+
+  * `data`: Array of all the  data rows.
+
+  the function should return a string with the text to show in the footer cell.
+
+- **Default:** `undefined`
+
+- **Example:** [Footer Formatter](https://examples.bootstrap-table.com/#column-options/footer-formatter.html)
+
+## formatter
+
+- **Attribute:** `data-formatter`
+
+- **Type:** `Function`
+
+- **Detail:**
+
+  The context (this) is the column Object.
+
+  The cell formatter function, take three parameters:
 
   * `value`: the field value.
   * `row`: the row record data.
   * `index`: the row index.
   * `field`: the row field.
 
-  Support classes or css.
+- **Default:** `undefined`
+
+- **Example:** [Column Formatter](https://examples.bootstrap-table.com/#column-options/format.html)
+
+## halign
+
+- **Attribute:** `data-halign`
+
+- **Type:** `String`
+
+- **Detail:**
+
+  Indicate how to align the table header. `'left'`, `'right'`, `'center'` can be used.
 
 - **Default:** `undefined`
 
-- **Example:** [Cell Style](https://examples.bootstrap-table.com/#column-options/cell-style.html)
+- **Example:** [Aligning Columns](https://examples.bootstrap-table.com/#column-options/aligning-columns.html)
+
+## order
+
+- **Attribute:** `data-order`
+
+- **Type:** `String`
+
+- **Detail:**
+
+  The default sort order, can only be `'asc'` or `'desc'`.
+
+- **Default:** `'asc'`
+
+- **Example:** [Sort Name Order](https://examples.bootstrap-table.com/#column-options/sort-name-order.html)
 
 ## radio
 
@@ -214,50 +301,47 @@ The column options is defined in `jQuery.fn.bootstrapTable.columnDefaults`.
 
 - **Example:** [Column Radio](https://examples.bootstrap-table.com/#column-options/radio.html)
 
-## checkbox
+## rowspan
 
-- **Attribute:** `data-checkbox`
+- **Attribute:** `rowspan | data-rowspan`
 
-- **Type:** `Boolean`
+- **Type:** `Number`
 
 - **Detail:**
 
-  Set `true` to show a checkbox. The checkbox column has fixed width.
-
-  If a value is given the Checkbox is automatically checked.
-  Its also possible to check/uncheck the checkbox by use an formatter (return `true` to check, return `false` to uncheck).
+  Indicate how many rows a cell should take up.
 
-- **Default:** `false`
+- **Default:** `undefined`
 
-- **Example:** [Column Checkbox](https://examples.bootstrap-table.com/#column-options/checkbox.html)
+- **Example:** [Rowspan Colspan](https://examples.bootstrap-table.com/#column-options/rowspan-colspan.html)
 
-## checkboxEnabled
+## searchFormatter
 
-- **Attribute:** `data-checkbox-enabled`
+- **Attribute:** `data-search-formatter`
 
 - **Type:** `Boolean`
 
 - **Detail:**
 
-  Set `false` to disable the the checkboxes/radioboxes.
+  Set `true` to search use formatted data.
 
 - **Default:** `true`
 
-- **Example:** [Checkbox Enabled](https://examples.bootstrap-table.com/#column-options/checkbox-enabled.html) and [Checkbox Disabled](https://examples.bootstrap-table.com/#column-options/checkbox-disabled.html)
+- **Example:** [Search Formatter](https://examples.bootstrap-table.com/#column-options/format-search.html)
 
-## clickToSelect
+## searchable
 
-- **Attribute:** `data-click-to-select`
+- **Attribute:** `data-searchable`
 
 - **Type:** `Boolean`
 
 - **Detail:**
 
-  Set `true` to select checkbox or radiobox when clicking rows.
+  Set `true` to search data for this column.
 
-- **Default:** `false`
+- **Default:** `true`
 
-- **Example:** [Click to Select](https://examples.bootstrap-table.com/#column-options/click-to-select.html)
+- **Example:** [Column Searchable](https://examples.bootstrap-table.com/#column-options/searchable.html)
 
 ## showSelectTitle
 
@@ -273,20 +357,6 @@ The column options is defined in `jQuery.fn.bootstrapTable.columnDefaults`.
 
 - **Example:** [Show Select Title](https://examples.bootstrap-table.com/#column-options/show-select-title.html)
 
-## sortable
-
-- **Attribute:** `data-sortable`
-
-- **Type:** `Boolean`
-
-- **Detail:**
-
-  Set `true` to allow the column can be sorted.
-
-- **Default:** `false`
-
-- **Example:** [Column Sortable](https://examples.bootstrap-table.com/#column-options/sortable.html)
-
 ## sortName
 
 - **Attribute:** `data-sort-name`
@@ -301,19 +371,19 @@ The column options is defined in `jQuery.fn.bootstrapTable.columnDefaults`.
 
 - **Example:** [Sort Name Order](https://examples.bootstrap-table.com/#column-options/sort-name-order.html)
 
-## order
+## sortable
 
-- **Attribute:** `data-order`
+- **Attribute:** `data-sortable`
 
-- **Type:** `String`
+- **Type:** `Boolean`
 
 - **Detail:**
 
-  The default sort order, can only be `'asc'` or `'desc'`.
+  Set `true` to allow the column can be sorted.
 
-- **Default:** `'asc'`
+- **Default:** `false`
 
-- **Example:** [Sort Name Order](https://examples.bootstrap-table.com/#column-options/sort-name-order.html)
+- **Example:** [Column Sortable](https://examples.bootstrap-table.com/#column-options/sortable.html)
 
 ## sorter
 
@@ -330,25 +400,12 @@ The column options is defined in `jQuery.fn.bootstrapTable.columnDefaults`.
   * `rowA`: the first row.
   * `rowB`: the second row.
 
+  Expected return values: `-1, 0, 1`.
+
 - **Default:** `undefined`
 
 - **Example:** [Column Sorter](https://examples.bootstrap-table.com/#column-options/sorter.html)
 
-## visible
-
-- **Attribute:** `data-visible`
-
-- **Type:** `Boolean`
-
-- **Detail:**
-
-  Set `false` to hide the columns item.
-
-- **Default:** `true`
-
-
-- **Example:** [Column Visible](https://examples.bootstrap-table.com/#column-options/visible.html)
-
 ## switchable
 
 - **Attribute:** `data-switchable`
@@ -363,143 +420,88 @@ The column options is defined in `jQuery.fn.bootstrapTable.columnDefaults`.
 
 - **Example:** [Column Switchable](https://examples.bootstrap-table.com/#column-options/switchable.html)
 
-## cardVisible
-
-- **Attribute:** `data-card-visible`
-
-- **Type:** `Boolean`
-
-- **Detail:**
-
-  Set `false` to hide the columns item in card view state.
-
-- **Default:** `true`
-
-- **Example:** [Card Visible](https://examples.bootstrap-table.com/#column-options/card-visible.html)
-
-## searchable
-
-- **Attribute:** `data-searchable`
-
-- **Type:** `Boolean`
-
-- **Detail:**
-
-  Set `true` to search data for this column.
-
-- **Default:** `true`
-
-- **Example:** [Column Searchable](https://examples.bootstrap-table.com/#column-options/searchable.html)
-
-## formatter
+## title
 
-- **Attribute:** `data-formatter`
+- **Attribute:** `data-title`
 
-- **Type:** `Function`
+- **Type:** `String`
 
 - **Detail:**
 
-  The context (this) is the column Object.
-
-  The cell formatter function, take three parameters:
-
-  * `value`: the field value.
-  * `row`: the row record data.
-  * `index`: the row index.
-  * `field`: the row field.
+  The column title text.
 
 - **Default:** `undefined`
 
-- **Example:** [Column Formatter](https://examples.bootstrap-table.com/#column-options/format.html)
+- **Example:** [Column Title](https://examples.bootstrap-table.com/#column-options/title.html)
 
-## footerFormatter
+## titleTooltip
 
-- **Attribute:** `data-footer-formatter`
+- **Attribute:** `data-title-tooltip`
 
-- **Type:** `Function`
+- **Type:** `String`
 
 - **Detail:**
 
-  The context (this) is the column Object.
-
-  The function, take one parameter:
-
-  * `data`: Array of all the  data rows.
-
-  the function should return a string with the text to show in the footer cell.
+  The column title tooltip text. This option also support the title HTML attribute.
 
 - **Default:** `undefined`
 
-- **Example:** [Footer Formatter](https://examples.bootstrap-table.com/#column-options/footer-formatter.html)
+- **Example:** [Title Tooltip](https://examples.bootstrap-table.com/#column-options/title-tooltip.html)
 
-## detailFormatter
+## valign
 
-- **Attribute:** `data-detail-formatter`
+- **Attribute:** `data-valign`
 
-- **Type:** `Function`
+- **Type:** `String`
 
 - **Detail:**
 
-  Format your detail view when `detailView` and `detailViewByClick` is set to `true`. Return a `String` and it will be appended into the detail view cell, optionally render the element directly using the third parameter which is a jQuery element of the target cell.
-
-  Fallback is the detail-formatter of the table.
+  Indicate how to align the cell data. `'top'`, `'middle'`, `'bottom'` can be used.
 
-- **Default:** `function(index, row, $element) { return '' }`
+- **Default:** `undefined`
 
-- **Example:** [Detail Formatter](https://examples.bootstrap-table.com/#column-options/detail-formatter.html)
+- **Example:** [Aligning Columns](https://examples.bootstrap-table.com/#column-options/aligning-columns.html)
 
-## searchFormatter
+## visible
 
-- **Attribute:** `data-search-formatter`
+- **Attribute:** `data-visible`
 
 - **Type:** `Boolean`
 
 - **Detail:**
 
-  Set `true` to search use formatted data.
+  Set `false` to hide the columns item.
 
 - **Default:** `true`
 
-- **Example:** [Search Formatter](https://examples.bootstrap-table.com/#column-options/format-search.html)
 
-## escape
+- **Example:** [Column Visible](https://examples.bootstrap-table.com/#column-options/visible.html)
 
-- **Attribute:** `data-escape`
+## width
 
-- **Type:** `Boolean`
+- **Attribute:** `data-width`
+
+- **Type:** `Number`
 
 - **Detail:**
 
-  Escapes a string for insertion into HTML, replacing &, <, >, ", \`, and ' characters.
+  The width of column. If not defined, the width will auto expand to fit its contents. Though if the table is left responsive and sized too small this `'width'` might be ignored (use min/max-width via class or such then). The default used Unit is 'px', use `widthUnit` to change it!
 
-- **Default:** `false`
+- **Default:** `undefined`
 
-- **Example:** [Column Escape](https://examples.bootstrap-table.com/#column-options/escape.html)
+- **Example:** [Column Width](https://examples.bootstrap-table.com/#column-options/width.html)
 
-## events
+## widthUnit
 
-- **Attribute:** `data-events`
+- **Attribute:** `data-width-unit`
 
-- **Type:** `Object`
+- **Type:** `String`
 
 - **Detail:**
 
-  The cell events listener when you use formatter function, take four parameters:
-
-  * `event`: the jQuery event.
-  * `value`: the field value.
-  * `row`: the row record data.
-  * `index`: the row index.
-
-  Example code:
+  Defines the unit which is used for the option `width`.
 
-   {% highlight html %}
-  <th .. data-events="operateEvent">
-  var operateEvents = {
-    'click .like': function (e, value, row, index) {}
-  }
-  {% endhighlight %}
+- **Default:** `px`
 
-- **Default:** `undefined`
+- **Example:** [Width Unit](https://examples.bootstrap-table.com/#column-options/width-unit.html)
 
-- **Example:** [Column Events](https://examples.bootstrap-table.com/#column-options/events.html)

+ 145 - 145
site/docs/api/events.md

@@ -33,152 +33,155 @@ $('#table').on('event-name.bs.table', function (e, arg1, arg2, ...) {
   * `name`: the event name,
   * `args`: the event data.
 
-## onClickRow
+## onCheck
 
-- **jQuery Event:** `click-row.bs.table`
+- **jQuery Event:** `check.bs.table`
 
-- **Parameter:** `row, $element, field`
+- **Parameter:** `row, $element`
 
 - **Detail:**
 
-  Fires when user click a row, the parameters contain:
+  Fires when user check a row, the parameters contain:
 
   * `row`: the record corresponding to the clicked row.
-  * `$element`: the tr element.
-  * `field`: the field name corresponding to the clicked cell.
+  * `$element`: the DOM element checked.
 
-## onDblClickRow
+## onCheckAll
 
-- **jQuery Event:** `dbl-click-row.bs.table`
+- **jQuery Event:** `check-all.bs.table`
 
-- **Parameter:** `row, $element, field`
+- **Parameter:** `rowsAfter, rowsBefore`
 
 - **Detail:**
 
-  Fires when user double click a row, the parameters contain:
+  Fires when user check all rows, the parameters contain:
 
-  * `row`: the record corresponding to the clicked row.
-  * `$element`: the tr element.
-  * `field`: the field name corresponding to the clicked cell.
+  * `rowsAfter`: array of records of the now checked rows.
+  * `rowsBefore`: array of records of the checked rows before.
 
-## onClickCell
+## onCheckSome
 
-- **jQuery Event:** `click-cell.bs.table`
+- **jQuery Event:** `check-some.bs.table`
 
-- **Parameter:** `field, value, row, $element`
+- **Parameter:** `rows`
 
 - **Detail:**
 
-  Fires when user click a cell, the parameters contain:
+  Fires when user check some rows, the parameters contain:
 
-  * `field`: the field name corresponding to the clicked cell.
-  * `value`: the data value corresponding to the clicked cell.
-  * `row`: the record corresponding to the clicked row.
-  * `$element`: the td element.
+  * `rows`: array of records corresponding to newly checked rows.
 
-## onDblClickCell
+## onClickCell
 
-- **jQuery Event:** `dbl-click-cell.bs.table`
+- **jQuery Event:** `click-cell.bs.table`
 
 - **Parameter:** `field, value, row, $element`
 
 - **Detail:**
 
-  Fires when user double click a cell, the parameters contain:
+  Fires when user click a cell, the parameters contain:
 
   * `field`: the field name corresponding to the clicked cell.
   * `value`: the data value corresponding to the clicked cell.
   * `row`: the record corresponding to the clicked row.
   * `$element`: the td element.
 
-## onSort
+## onClickRow
 
-- **jQuery Event:** `sort.bs.table`
+- **jQuery Event:** `click-row.bs.table`
 
-- **Parameter:** `name, order`
+- **Parameter:** `row, $element, field`
 
 - **Detail:**
 
-  Fires when user sort a column, the parameters contain:
+  Fires when user click a row, the parameters contain:
 
-  * `name`: the sort column field name.
-  * `order`: the sort column order.
+  * `row`: the record corresponding to the clicked row.
+  * `$element`: the tr element.
+  * `field`: the field name corresponding to the clicked cell.
 
-## onCheck
+## onCollapseRow
 
-- **jQuery Event:** `check.bs.table`
+- **jQuery Event:** `collapse-row.bs.table`
 
-- **Parameter:** `row, $element`
+- **Parameter:** `index, row, detailView`
 
 - **Detail:**
 
-  Fires when user check a row, the parameters contain:
+  Fires when click the detail icon to collapse the detail view, the parameters contain:
 
-  * `row`: the record corresponding to the clicked row.
-  * `$element`: the DOM element checked.
+  * `index`: the index of the collapsed row.
+  * `row`: the record corresponding to the collapsed row.
+  * `detailView`: the collapsed detailView.
 
-## onUncheck
+## onColumnSwitch
 
-- **jQuery Event:** `uncheck.bs.table`
+- **jQuery Event:** `column-switch.bs.table`
 
-- **Parameter:** `row, $element`
+- **Parameter:** `field, checked`
 
 - **Detail:**
 
-  Fires when user uncheck a row, the parameters contain:
+  Fires when switch the column visible ([showColumns](/docs/api/table-options/#showcolumns)), the parameters contain:
 
-  * `row`: the record corresponding to the clicked row.
-  * `$element`: the DOM element unchecked.
+  * `field`: the field name corresponding to the switch column.
+  * `checked`: the checked state of the column.
 
-## onCheckAll
+## onDblClickCell
 
-- **jQuery Event:** `check-all.bs.table`
+- **jQuery Event:** `dbl-click-cell.bs.table`
 
-- **Parameter:** `rowsAfter, rowsBefore`
+- **Parameter:** `field, value, row, $element`
 
 - **Detail:**
 
-  Fires when user check all rows, the parameters contain:
+  Fires when user double click a cell, the parameters contain:
 
-  * `rowsAfter`: array of records of the now checked rows.
-  * `rowsBefore`: array of records of the checked rows before.
+  * `field`: the field name corresponding to the clicked cell.
+  * `value`: the data value corresponding to the clicked cell.
+  * `row`: the record corresponding to the clicked row.
+  * `$element`: the td element.
 
-## onUncheckAll
+## onDblClickRow
 
-- **jQuery Event:** `uncheck-all.bs.table`
+- **jQuery Event:** `dbl-click-row.bs.table`
 
-- **Parameter:** `rowsAfter, rowsBefore`
+- **Parameter:** `row, $element, field`
 
 - **Detail:**
 
-  Fires when user uncheck all rows, the parameters contain:
+  Fires when user double click a row, the parameters contain:
 
-  * `rowsAfter`: array of records of the now checked rows.
-  * `rowsBefore`: array of records of the checked rows before.
+  * `row`: the record corresponding to the clicked row.
+  * `$element`: the tr element.
+  * `field`: the field name corresponding to the clicked cell.
 
-## onCheckSome
+## onExpandRow
 
-- **jQuery Event:** `check-some.bs.table`
+- **jQuery Event:** `expand-row.bs.table`
 
-- **Parameter:** `rows`
+- **Parameter:** `index, row, $detail`
 
 - **Detail:**
 
-  Fires when user check some rows, the parameters contain:
+  Fires when click the detail icon to expand the detail view, the parameters contain:
 
-  * `rows`: array of records corresponding to newly checked rows.
+  * `index`: the index of the expanded row.
+  * `row`: the record corresponding to the expanded row.
+  * `$detail`: the DOM element of the detail `div` after current `tr` element, you can use jQuery methods to custom the detail views.
 
-## onUncheckSome
+## onLoadError
 
-- **jQuery Event:** `uncheck-some.bs.table`
+- **jQuery Event:** `load-error.bs.table`
 
-- **Parameter:** `rows`
+- **Parameter:** `status, jqXHR`
 
 - **Detail:**
 
-  Fires when user uncheck some rows, the parameters contain:
+  Fires when some errors occur to load remote data, the parameters contain:
 
-  * `rows`: array of records corresponding to previously checked rows.
+  * `status`: the status code of `jqXHR`.
+  * `jqXHR`: jqXHR object, which is a superset of the XMLHTTPRequest object. For more information, see the [jqXHR Type](http://api.jquery.com/Types/#jqXHR).
 
 ## onLoadSuccess
 
@@ -194,183 +197,180 @@ $('#table').on('event-name.bs.table', function (e, arg1, arg2, ...) {
   * `status`: the status code of `jqXHR`.
   * `jqXHR`: jqXHR object, which is a superset of the XMLHTTPRequest object. For more information, see the [jqXHR Type](http://api.jquery.com/Types/#jqXHR).
 
-## onLoadError
+## onPageChange
 
-- **jQuery Event:** `load-error.bs.table`
+- **jQuery Event:** `page-change.bs.table`
 
-- **Parameter:** `status, jqXHR`
+- **Parameter:** `number, size`
 
 - **Detail:**
 
-  Fires when some errors occur to load remote data, the parameters contain:
+  Fires when change the page number or page size, the parameters contain:
 
-  * `status`: the status code of `jqXHR`.
-  * `jqXHR`: jqXHR object, which is a superset of the XMLHTTPRequest object. For more information, see the [jqXHR Type](http://api.jquery.com/Types/#jqXHR).
+  * `number`: the page number.
+  * `size`: the page size.
 
-## onColumnSwitch
+## onPostBody
 
-- **jQuery Event:** `column-switch.bs.table`
+- **jQuery Event:** `post-body.bs.table`
 
-- **Parameter:** `field, checked`
+- **Parameter:** `data`
 
 - **Detail:**
 
-  Fires when switch the column visible ([showColumns](/docs/api/table-options/#showcolumns)), the parameters contain:
+  Fires after the table body is rendered and available in the DOM, the parameters contain:
 
-  * `field`: the field name corresponding to the switch column.
-  * `checked`: the checked state of the column.
+  * `data`: the rendered data.
 
-## onPageChange
+## onPostFooter
 
-- **jQuery Event:** `page-change.bs.table`
+- **jQuery Event:** `post-footer.bs.table`
 
-- **Parameter:** `number, size`
+- **Parameter:** `$tableFooter`
 
 - **Detail:**
 
-  Fires when change the page number or page size, the parameters contain:
+  Fires after the footer is rendered and available in the DOM, the parameters contain:
 
-  * `number`: the page number.
-  * `size`: the page size.
+  * `$tableFooter`: the DOM element of the footer.
 
-## onSearch
+## onPostHeader
 
-- **jQuery Event:** `search.bs.table`
+- **jQuery Event:** `post-header.bs.table`
 
-- **Parameter:** `text`
+- **Parameter:** `undefined`
 
 - **Detail:**
 
-  Fires when search the table, the parameters contain:
-
-  * `text`: the text of the search input.
+  Fires after the table header is rendered and available in the DOM.
 
-## onToggle
+## onPreBody
 
-- **jQuery Event:** `toggle.bs.table`
+- **jQuery Event:** `pre-body.bs.table`
 
-- **Parameter:** `cardView`
+- **Parameter:** `data`
 
 - **Detail:**
 
-  Fires when toggle the view of table, the parameters contain:
+  Fires before the table body is rendered, the parameters contain:
 
-  * `cardView`: the cardView state of the table.
+  * `data`: the rendered data.
 
-## onPreBody
+## onRefresh
 
-- **jQuery Event:** `pre-body.bs.table`
+- **jQuery Event:** `refresh.bs.table`
 
-- **Parameter:** `data`
+- **Parameter:** `params`
 
 - **Detail:**
 
-  Fires before the table body is rendered, the parameters contain:
+  Fires after the click the refresh button, the parameters contain:
 
-  * `data`: the rendered data.
+  * `params`: the additional parameters request to the server.
 
-## onPostBody
+## onRefreshOptions
 
-- **jQuery Event:** `post-body.bs.table`
+- **jQuery Event:** `refresh-options.bs.table`
 
-- **Parameter:** `data`
+- **Parameter:** `options`
 
 - **Detail:**
 
-  Fires after the table body is rendered and available in the DOM, the parameters contain:
+  Fires after refresh the options and before destroy and init the table, the parameters contain:
 
-  * `data`: the rendered data.
+  * `options`: the table options object.
 
-## onPostHeader
+## onResetView
 
-- **jQuery Event:** `post-header.bs.table`
+- **jQuery Event:** `reset-view.bs.table`
 
 - **Parameter:** `undefined`
 
 - **Detail:**
 
-  Fires after the table header is rendered and available in the DOM.
+  Fires when reset view of the table.
 
-## onPostFooter
+## onScrollBody
 
-- **jQuery Event:** `post-footer.bs.table`
+- **jQuery Event:** `scroll-body.bs.table`
 
-- **Parameter:** `$tableFooter`
+- **Parameter:**: `$tableBody`
 
 - **Detail:**
 
-  Fires after the footer is rendered and available in the DOM, the parameters contain:
-
-  * `$tableFooter`: the DOM element of the footer.
-
-## onExpandRow
+  Fires when table body scroll.
+## onSearch
 
-- **jQuery Event:** `expand-row.bs.table`
+- **jQuery Event:** `search.bs.table`
 
-- **Parameter:** `index, row, $detail`
+- **Parameter:** `text`
 
 - **Detail:**
 
-  Fires when click the detail icon to expand the detail view, the parameters contain:
+  Fires when search the table, the parameters contain:
 
-  * `index`: the index of the expanded row.
-  * `row`: the record corresponding to the expanded row.
-  * `$detail`: the DOM element of the detail `div` after current `tr` element, you can use jQuery methods to custom the detail views.
+  * `text`: the text of the search input.
 
-## onCollapseRow
+## onSort
 
-- **jQuery Event:** `collapse-row.bs.table`
+- **jQuery Event:** `sort.bs.table`
 
-- **Parameter:** `index, row, detailView`
+- **Parameter:** `name, order`
 
 - **Detail:**
 
-  Fires when click the detail icon to collapse the detail view, the parameters contain:
+  Fires when user sort a column, the parameters contain:
 
-  * `index`: the index of the collapsed row.
-  * `row`: the record corresponding to the collapsed row.
-  * `detailView`: the collapsed detailView.
+  * `name`: the sort column field name.
+  * `order`: the sort column order.
 
-## onRefreshOptions
+## onToggle
 
-- **jQuery Event:** `refresh-options.bs.table`
+- **jQuery Event:** `toggle.bs.table`
 
-- **Parameter:** `options`
+- **Parameter:** `cardView`
 
 - **Detail:**
 
-  Fires after refresh the options and before destroy and init the table, the parameters contain:
+  Fires when toggle the view of table, the parameters contain:
 
-  * `options`: the table options object.
+  * `cardView`: the cardView state of the table.
 
-## onResetView
+## onUncheck
 
-- **jQuery Event:** `reset-view.bs.table`
+- **jQuery Event:** `uncheck.bs.table`
 
-- **Parameter:** `undefined`
+- **Parameter:** `row, $element`
 
 - **Detail:**
 
-  Fires when reset view of the table.
+  Fires when user uncheck a row, the parameters contain:
 
-## onRefresh
+  * `row`: the record corresponding to the clicked row.
+  * `$element`: the DOM element unchecked.
 
-- **jQuery Event:** `refresh.bs.table`
+## onUncheckAll
 
-- **Parameter:** `params`
+- **jQuery Event:** `uncheck-all.bs.table`
+
+- **Parameter:** `rowsAfter, rowsBefore`
 
 - **Detail:**
 
-  Fires after the click the refresh button, the parameters contain:
+  Fires when user uncheck all rows, the parameters contain:
 
-  * `params`: the additional parameters request to the server.
+  * `rowsAfter`: array of records of the now checked rows.
+  * `rowsBefore`: array of records of the checked rows before.
 
-## onScrollBody
+## onUncheckSome
 
-- **jQuery Event:** `scroll-body.bs.table`
+- **jQuery Event:** `uncheck-some.bs.table`
 
-- **Parameter:**: `$tableBody`
+- **Parameter:** `rows`
 
 - **Detail:**
 
-  Fires when table body scroll.
+  Fires when user uncheck some rows, the parameters contain:
+
+  * `rows`: array of records corresponding to previously checked rows.
+

+ 41 - 41
site/docs/api/localizations.md

@@ -48,41 +48,28 @@ $('#table').bootstrapTable({
 })
 {% endhighlight %}
 
-## formatLoadingMessage
+## formatAllRows
 
 - **Parameter:** `undefined`
 
-- **Default:** `'Loading, please wait…'`
-
-## formatRecordsPerPage
-
-- **Parameter:** `pageNumber`
-
-- **Default:** `'%s records per page'`
-
-## formatShowingRows
-
-- **Parameter:** `pageFrom, pageTo, totalRows`
-
-- **Default:** `'Showing %s to %s of %s rows'`
-
-## formatSRPaginationPreText
+- **Default:** `'All'`
+## formatClearSearch
 
 - **Parameter:** `undefined`
 
-- **Default:** `'previous page'`
+- **Default:** `'Clear Search'`
 
-## formatSRPaginationPageText
+## formatColumns
 
-- **Parameter:** `page`
+- **Parameter:** `undefined`
 
-- **Default:** `'to page %s`
+- **Default:** `'Columns'`
 
-## formatSRPaginationNextText
+## formatColumnsToggleAll
 
 - **Parameter:** `undefined`
 
-- **Default:** `'next page'`
+- **Default:** `'Toggle all'`
 
 ## formatDetailPagination
 
@@ -90,17 +77,17 @@ $('#table').bootstrapTable({
 
 - **Default:** `'Showing %s rows'`
 
-## formatSearch
+## formatFullscreen
 
 - **Parameter:** `undefined`
 
-- **Default:** `'Search'`
+- **Default:** `'Fullscreen'`
 
-## formatClearSearch
+## formatLoadingMessage
 
 - **Parameter:** `undefined`
 
-- **Default:** `'Clear Search'`
+- **Default:** `'Loading, please wait…'`
 
 ## formatNoMatches
 
@@ -126,50 +113,63 @@ $('#table').bootstrapTable({
 
 - **Default:** `'Hide pagination'`
 
+## formatRecordsPerPage
+
+- **Parameter:** `pageNumber`
+
+- **Default:** `'%s records per page'`
+
 ## formatRefresh
 
 - **Parameter:** `undefined`
 
 - **Default:** `'Refresh'`
 
-## formatToggle
+## formatSRPaginationNextText
 
 - **Parameter:** `undefined`
 
-- **Default:** `'Toggle'`
+- **Default:** `'next page'`
 
-## formatToggleOn
+## formatSRPaginationPageText
 
-- **Parameter:** `undefined`
+- **Parameter:** `page`
 
-- **Default:** `'Show card view'`
+- **Default:** `'to page %s`
 
-## formatToggleOff
+## formatSRPaginationPreText
 
 - **Parameter:** `undefined`
 
-- **Default:** `'Hide card view'`
+- **Default:** `'previous page'`
 
-## formatColumns
+## formatSearch
 
 - **Parameter:** `undefined`
 
-- **Default:** `'Columns'`
+- **Default:** `'Search'`
 
-## formatColumnsToggleAll
+## formatShowingRows
+
+- **Parameter:** `pageFrom, pageTo, totalRows`
+
+- **Default:** `'Showing %s to %s of %s rows'`
+
+## formatToggle
 
 - **Parameter:** `undefined`
 
-- **Default:** `'Toggle all'`
+- **Default:** `'Toggle'`
 
-## formatFullscreen
+## formatToggleOff
 
 - **Parameter:** `undefined`
 
-- **Default:** `'Fullscreen'`
+- **Default:** `'Hide card view'`
 
-## formatAllRows
+## formatToggleOn
 
 - **Parameter:** `undefined`
 
-- **Default:** `'All'`
+- **Default:** `'Show card view'`
+

+ 269 - 269
site/docs/api/methods.md

@@ -8,250 +8,248 @@ toc: true
 
 The calling method syntax: `$('#table').bootstrapTable('method', parameter)`.
 
-## getOptions
+## append
 
-- **Parameter:** `undefined`
+- **Parameter:** `data`
 
 - **Detail:**
 
-  Return the options object.
+  Append the `data` to table.
 
-- **Example:** [Get Options](https://examples.bootstrap-table.com/#methods/get-options.html)
+- **Example:** [Append](https://examples.bootstrap-table.com/#methods/append.html)
 
-## refreshOptions
+## check
 
-- **Parameter:** `options`
+- **Parameter:** `index`
 
 - **Detail:**
 
-  Refresh the table `options`.
+  Check a row, the row `index` start with 0.
 
-- **Example:** [Refresh Options](https://examples.bootstrap-table.com/#methods/refresh-options.html)
+- **Example:** [Check/Uncheck](https://examples.bootstrap-table.com/#methods/check-uncheck.html)
 
-## getData
+## checkAll
 
-- **Parameter:** `params`
+- **Parameter:** `undefined`
 
 - **Detail:**
 
-  Get the loaded data of table at the moment that this method is called
-
-  * `useCurrentPage`: if set to true the method will return the data only in the current page.
-  * `includeHiddenRows`: if set to true the method will include the hidden rows.
-  * `unfiltered`: if set to true the method will include all data (unfiltered).
+  Check all current page rows.
 
-- **Example:** [Get Data](https://examples.bootstrap-table.com/#methods/getData.html)
+- **Example:** [Check/Uncheck All](https://examples.bootstrap-table.com/#methods/check-uncheck-all.html)
 
-## getSelections
+## checkBy
 
-- **Parameter:** `undefined`
+- **Parameter:** `params`
 
 - **Detail:**
 
-  Return selected rows, when no record selected, an empty array will return.
+  Check a row by array of values, the params contain:
 
-- **Example:** [Get Selections](https://examples.bootstrap-table.com/#methods/get-selections.html)
+  * `field`: name of the field used to find records.
+  * `values`: array of values for rows to check.
 
-## getAllSelections
+- **Example:** [Check/Uncheck By](https://examples.bootstrap-table.com/#methods/check-uncheck-by.html)
+
+## checkInvert
 
 - **Parameter:** `undefined`
 
 - **Detail:**
 
-  Return all selected rows contain search or filter, when no record selected, an empty array will return.
+  Invert check of current page rows. Triggers `onCheckSome` and `onUncheckSome` events.
 
-- **Example:** [Get All Selections](https://examples.bootstrap-table.com/#methods/get-all-selections.html)
+- **Example:** [Check Invert](https://examples.bootstrap-table.com/#methods/check-invert.html)
 
-## load
+## collapseAllRows
 
-- **Parameter:** `data`
+- **Parameter:** `undefined`
 
 - **Detail:**
 
-  Load the `data` to table, the old rows will be removed.
+  Collapse all rows if the detail view option is set to `true`.
 
-- **Example:** [Load](https://examples.bootstrap-table.com/#methods/load.html)
+- **Example:** [Expand/Collapse All Rows](https://examples.bootstrap-table.com/#methods/expand-collapse-all-rows.html)
 
-## append
+## collapseRow
 
-- **Parameter:** `data`
+- **Parameter:** `index`
 
 - **Detail:**
 
-  Append the `data` to table.
+  Collapse the row that has the `index` passed by parameter if the detail view option is set to `true`.
 
-- **Example:** [Append](https://examples.bootstrap-table.com/#methods/append.html)
+- **Example:** [Expand/Collapse Row](https://examples.bootstrap-table.com/#methods/expand-collapse-row.html)
 
-## prepend
+## destroy
 
-- **Parameter:** `data`
+- **Parameter:** `undefined`
 
 - **Detail:**
 
-  Prepend the `data` to table.
+  Destroy the Bootstrap Table.
 
-- **Example:** [Prepend](https://examples.bootstrap-table.com/#methods/prepend.html)
+- **Example:** [Destroy](https://examples.bootstrap-table.com/#methods/destroy.html)
 
-## remove
+## expandAllRows
 
-- **Parameter:** `params`
+- **Parameter:** `undefined`
 
 - **Detail:**
 
-  Remove data from table, the params contain two properties:
-
-  * `field`: the field name of remove rows.
-  * `values`: the array of values for rows which should be removed.
+  Expand all rows if the detail view option is set to `true`.
 
-- **Example:** [Remove](https://examples.bootstrap-table.com/#methods/remove.html)
+- **Example:** [Expand/Collapse All Rows](https://examples.bootstrap-table.com/#methods/expand-collapse-all-rows.html)
 
-## removeAll
+## expandRow
 
-- **Parameter:** `undefined`
+- **Parameter:** `index`
 
 - **Detail:**
 
-  Remove all data from table.
+  Expand the row that has the `index` passed by parameter if the detail view option is set to `true`.
 
-- **Example:** [Remove All](https://examples.bootstrap-table.com/#methods/remove-all.html)
+- **Example:** [Expand/Collapse Row](https://examples.bootstrap-table.com/#methods/expand-collapse-row.html)
 
-## insertRow
+## filterBy
 
-- **Parameter:** `params`
+- **Parameter:**
+    - `filter - An Object of filter`
+    Default: `{}`
+    - `options - An Object of options`
+    Default:
+        ```
+        {
+            'filterAlgorithm': 'and'
+        }
+        ```
 
 - **Detail:**
 
-  Insert a new row, the params contain following properties:
+  (Can use only in client-side) Filter data in table.
+  There are multiple ways to filter:
+  - Leave the options blank to use the `and` filter.
+  - Set the `filterAlgorithm` (see at parameter) to `or` to use the `or` filter.
+  - Pass a function to the `filterAlgorithm` (see at parameter) to use a `custom` filter.
 
-  * `index`: the row index to insert into.
-  * `row`: the row data.
+  **Filter Algorithm**
 
-- **Example:** [Insert Row](https://examples.bootstrap-table.com/#methods/insert-row.html)
+  - And
+    - Filter `{age: 10}` to show the data only age is equal to 10.  You can also filter with an array of values, as in: `{age: 10, hairColor: ['blue', 'red', 'green']}` to find data where age is equal to 10 and hairColor is either blue, red, or green.
+  - Or
+    - Filter `{age: 10, name: "santa"}` to show all Data which has a age of 10 **or** the name is equals to santa.
+  - Custom
+    - Filter by your Custom algorithm
+    - Function parameters:
+        - Row
+        - Filters
+    - Return `true` to keep the row and return `false` to filter the row.
 
-## updateRow
+- **Example:** [Filter By](https://examples.bootstrap-table.com/#methods/filter-by.html)
 
-- **Parameter:** `params`
+## getAllSelections
 
-- **Detail:**
+- **Parameter:** `undefined`
 
-  Update the specified row(s), each params contain following properties:
+- **Detail:**
 
-  * `index`: the row index to be updated.
-  * `row`: the new row data.
-  * `replace` (optional): set to `true` to replace the row instead of extending.
+  Return all selected rows contain search or filter, when no record selected, an empty array will return.
 
-- **Example:** [Update Row](https://examples.bootstrap-table.com/#methods/update-row.html)
+- **Example:** [Get All Selections](https://examples.bootstrap-table.com/#methods/get-all-selections.html)
 
-## getRowByUniqueId
+## getData
 
-- **Parameter:** `id`
+- **Parameter:** `params`
 
 - **Detail:**
 
-  Get data from table, the row that contains the `id` passed by parameter.
+  Get the loaded data of table at the moment that this method is called
 
-- **Example:** [Get Row By Unique Id](https://examples.bootstrap-table.com/#methods/get-row-by-unique-id.html)
+  * `useCurrentPage`: if set to true the method will return the data only in the current page.
+  * `includeHiddenRows`: if set to true the method will include the hidden rows.
+  * `unfiltered`: if set to true the method will include all data (unfiltered).
 
-## updateByUniqueId
+- **Example:** [Get Data](https://examples.bootstrap-table.com/#methods/getData.html)
 
-- **Parameter:** `params`
+## getHiddenColumns
 
-- **Detail:**
+- **Parameter:** `undefined`
 
-  Update the specified row(s), each params contain following properties:
+- **Detail:**
 
-  * `id`: a row id where the id should be the uniqueid field assigned to the table.
-  * `row`: the new row data.
-  * `replace` (optional): set to `true` to replace the row instead of extending.
+  Get hidden columns.
 
-- **Example:** [Update By Unique Id](https://examples.bootstrap-table.com/#methods/update-by-unique-id.html)
+- **Example:** [Get Visible/Hidden Columns](https://examples.bootstrap-table.com/#methods/get-visible-hidden-columns.html)
 
-## removeByUniqueId
+## getHiddenRows
 
-- **Parameter:** `id`
+- **Parameter:** `show`
 
 - **Detail:**
 
-  Remove data from table, the row that contains the `id` passed by parameter.
+  Get all rows hidden and if you pass the `show` parameter `true` the rows will be shown again, otherwise, the method only will return the rows hidden.
 
-- **Example:** [Remove By Unique Id](https://examples.bootstrap-table.com/#methods/remove-by-unique-id.html)
+- **Example:** [Get Hidden Rows](https://examples.bootstrap-table.com/#methods/get-hidden-rows.html)
 
-## updateCell
+## getOptions
 
-- **Parameter:** `params`
+- **Parameter:** `undefined`
 
 - **Detail:**
 
-  Update one cell, the params contain following properties:
-
-  * `index`: the row index.
-  * `field`: the field name.
-  * `value`: the new field value.
-
-  To disable table re-initialization you can set `{reinit: false}`.
+  Return the options object.
 
-- **Example:** [Update Cell](https://examples.bootstrap-table.com/#methods/update-cell.html)
+- **Example:** [Get Options](https://examples.bootstrap-table.com/#methods/get-options.html)
 
-## updateCellByUniqueId
+## getRowByUniqueId
 
-- **Parameter:** `params`
+- **Parameter:** `id`
 
 - **Detail:**
 
-  Update the cell specified by the id, each params contain following properties:
-
-  * `id`: row id where the id should be the `uniqueId` field assigned to the table.
-  * `field`: field name of the cell to be updated.
-  * `value`: new value of the cell.
+  Get data from table, the row that contains the `id` passed by parameter.
 
-- **Example:** [Update Cell By Unique Id](https://examples.bootstrap-table.com/#methods/update-cell-by-unique-id.html)
+- **Example:** [Get Row By Unique Id](https://examples.bootstrap-table.com/#methods/get-row-by-unique-id.html)
 
-## showRow
+## getScrollPosition
 
-- **Parameter:** `params`
+- **Parameter:** `undefined`
 
 - **Detail:**
 
-  Show the specified row. The params must contain at least one of the following properties:
-
-  * `index`: the row index.
-  * `uniqueId`: the value of the uniqueId for that row.
+  Get the current scroll position, the unit is `'px'`.
 
-- **Example:** [Show/Hide Row](https://examples.bootstrap-table.com/#methods/show-hide-row.html)
+- **Example:** [Get Scroll Position](https://examples.bootstrap-table.com/#methods/get-scroll-position.html)
 
-## hideRow
+## getSelections
 
-- **Parameter:** `params`
+- **Parameter:** `undefined`
 
 - **Detail:**
 
-  Hide the specified row. The params must contain at least one of the following properties:
-
-  * `index`: the row index.
-  * `uniqueId`: the value of the uniqueId for that row.
+  Return selected rows, when no record selected, an empty array will return.
 
-- **Example:** [Show/Hide Row](https://examples.bootstrap-table.com/#methods/show-hide-row.html)
+- **Example:** [Get Selections](https://examples.bootstrap-table.com/#methods/get-selections.html)
 
-## getHiddenRows
+## getVisibleColumns
 
-- **Parameter:** `show`
+- **Parameter:** `-`
 
 - **Detail:**
 
-  Get all rows hidden and if you pass the `show` parameter `true` the rows will be shown again, otherwise, the method only will return the rows hidden.
+  Get visible columns.
 
-- **Example:** [Get Hidden Rows](https://examples.bootstrap-table.com/#methods/get-hidden-rows.html)
+- **Example:** [Get Visible/Hidden Columns](https://examples.bootstrap-table.com/#methods/get-visible-hidden-columns.html)
 
-## showColumn
+## hideAllColumns
 
-- **Parameter:** `field`
+- **Parameter:** `undefined`
 
 - **Detail:**
 
-  Show the specified `field` column.
-  The parameter can be a string or a array of fields.
+  Hide All the columns.
 
-- **Example:** [Show/Hide Column](https://examples.bootstrap-table.com/#methods/show-hide-column.html)
+- **Example:** [Show/Hide All Columns](https://examples.bootstrap-table.com/#methods/show-hide-all-columns.html)
 
 ## hideColumn
 
@@ -264,45 +262,51 @@ The calling method syntax: `$('#table').bootstrapTable('method', parameter)`.
 
 - **Example:** [Show/Hide Column](https://examples.bootstrap-table.com/#methods/show-hide-column.html)
 
-## getVisibleColumns
+## hideLoading
 
-- **Parameter:** `-`
+- **Parameter:** `undefined`
 
 - **Detail:**
 
-  Get visible columns.
+  Hide loading status.
 
-- **Example:** [Get Visible/Hidden Columns](https://examples.bootstrap-table.com/#methods/get-visible-hidden-columns.html)
+- **Example:** [Show/Hide Loading](https://examples.bootstrap-table.com/#methods/show-hide-loading.html)
 
-## getHiddenColumns
+## hideRow
 
-- **Parameter:** `undefined`
+- **Parameter:** `params`
 
 - **Detail:**
 
-  Get hidden columns.
+  Hide the specified row. The params must contain at least one of the following properties:
 
-- **Example:** [Get Visible/Hidden Columns](https://examples.bootstrap-table.com/#methods/get-visible-hidden-columns.html)
+  * `index`: the row index.
+  * `uniqueId`: the value of the uniqueId for that row.
 
-## showAllColumns
+- **Example:** [Show/Hide Row](https://examples.bootstrap-table.com/#methods/show-hide-row.html)
 
-- **Parameter:** `undefined`
+## insertRow
+
+- **Parameter:** `params`
 
 - **Detail:**
 
-  Show All the columns.
+  Insert a new row, the params contain following properties:
 
-- **Example:** [Show/Hide All Columns](https://examples.bootstrap-table.com/#methods/show-hide-all-columns.html)
+  * `index`: the row index to insert into.
+  * `row`: the row data.
 
-## hideAllColumns
+- **Example:** [Insert Row](https://examples.bootstrap-table.com/#methods/insert-row.html)
 
-- **Parameter:** `undefined`
+## load
+
+- **Parameter:** `data`
 
 - **Detail:**
 
-  Hide All the columns.
+  Load the `data` to table, the old rows will be removed.
 
-- **Example:** [Show/Hide All Columns](https://examples.bootstrap-table.com/#methods/show-hide-all-columns.html)
+- **Example:** [Load](https://examples.bootstrap-table.com/#methods/load.html)
 
 ## mergeCells
 
@@ -319,101 +323,98 @@ The calling method syntax: `$('#table').bootstrapTable('method', parameter)`.
 
 - **Example:** [Merge Cells](https://examples.bootstrap-table.com/#methods/merge-cells.html)
 
-## checkAll
+## nextPage
 
 - **Parameter:** `undefined`
 
 - **Detail:**
 
-  Check all current page rows.
+  Go to next page.
 
-- **Example:** [Check/Uncheck All](https://examples.bootstrap-table.com/#methods/check-uncheck-all.html)
+- **Example:** [Select/Prev/Next Page](https://examples.bootstrap-table.com/#methods/select-prev-next-page.html)
 
-## uncheckAll
+## prepend
 
-- **Parameter:** `undefined`
+- **Parameter:** `data`
 
 - **Detail:**
 
-  Uncheck all current page rows.
+  Prepend the `data` to table.
 
-- **Example:** [Check/Uncheck All](https://examples.bootstrap-table.com/#methods/check-uncheck-all.html)
+- **Example:** [Prepend](https://examples.bootstrap-table.com/#methods/prepend.html)
 
-## checkInvert
+## prevPage
 
 - **Parameter:** `undefined`
 
 - **Detail:**
 
-  Invert check of current page rows. Triggers `onCheckSome` and `onUncheckSome` events.
+  Go to previous page.
 
-- **Example:** [Check Invert](https://examples.bootstrap-table.com/#methods/check-invert.html)
+- **Example:** [Select/Prev/Next Page](https://examples.bootstrap-table.com/#methods/select-prev-next-page.html)
 
-## check
+## refresh
 
-- **Parameter:** `index`
+- **Parameter:** `params`
 
 - **Detail:**
 
-  Check a row, the row `index` start with 0.
+  Refresh/reload the remote server data, you can set `{silent: true}` to refresh the data silently, and set `{url: newUrl, pageNumber: pageNumber, pageSize: pageSize}` to change the url (optional), page number (optional) and page size (optional). To supply query params specific to this request, set `{query: {foo: 'bar'}}`.
 
-- **Example:** [Check/Uncheck](https://examples.bootstrap-table.com/#methods/check-uncheck.html)
+- **Example:** [Refresh](https://examples.bootstrap-table.com/#methods/refresh.html)
 
-## uncheck
+## refreshOptions
 
-- **Parameter:** `index`
+- **Parameter:** `options`
 
 - **Detail:**
 
-  Uncheck a row, the row `index` start with 0.
+  Refresh the table `options`.
 
-- **Example:** [Check/Uncheck](https://examples.bootstrap-table.com/#methods/check-uncheck.html)
+- **Example:** [Refresh Options](https://examples.bootstrap-table.com/#methods/refresh-options.html)
 
-## checkBy
+## remove
 
 - **Parameter:** `params`
 
 - **Detail:**
 
-  Check a row by array of values, the params contain:
+  Remove data from table, the params contain two properties:
 
-  * `field`: name of the field used to find records.
-  * `values`: array of values for rows to check.
+  * `field`: the field name of remove rows.
+  * `values`: the array of values for rows which should be removed.
 
-- **Example:** [Check/Uncheck By](https://examples.bootstrap-table.com/#methods/check-uncheck-by.html)
+- **Example:** [Remove](https://examples.bootstrap-table.com/#methods/remove.html)
 
-## uncheckBy
+## removeAll
 
-- **Parameter:** `params`
+- **Parameter:** `undefined`
 
 - **Detail:**
 
-  Uncheck a row by array of values, the params contain:
-
-  * `field`: name of the field used to find records.
-  * `values`: array of values for rows to uncheck.
+  Remove all data from table.
 
-- **Example:** [Check/Uncheck By](https://examples.bootstrap-table.com/#methods/check-uncheck-by.html)
+- **Example:** [Remove All](https://examples.bootstrap-table.com/#methods/remove-all.html)
 
-## refresh
+## removeByUniqueId
 
-- **Parameter:** `params`
+- **Parameter:** `id`
 
 - **Detail:**
 
-  Refresh/reload the remote server data, you can set `{silent: true}` to refresh the data silently, and set `{url: newUrl, pageNumber: pageNumber, pageSize: pageSize}` to change the url (optional), page number (optional) and page size (optional). To supply query params specific to this request, set `{query: {foo: 'bar'}}`.
+  Remove data from table, the row that contains the `id` passed by parameter.
 
-- **Example:** [Refresh](https://examples.bootstrap-table.com/#methods/refresh.html)
+- **Example:** [Remove By Unique Id](https://examples.bootstrap-table.com/#methods/remove-by-unique-id.html)
 
-## destroy
+## resetSearch
 
-- **Parameter:** `undefined`
+- **Parameter:** `text`
 
 - **Detail:**
 
-  Destroy the Bootstrap Table.
+  Set the search `text`.
 
-- **Example:** [Destroy](https://examples.bootstrap-table.com/#methods/destroy.html)
+- **Example:** [Reset Search](https://examples.bootstrap-table.com/#methods/reset-search.html)
 
 ## resetView
 
@@ -427,205 +428,190 @@ The calling method syntax: `$('#table').bootstrapTable('method', parameter)`.
 
 - **Example:** [Reset View](https://examples.bootstrap-table.com/#methods/reset-view.html)
 
-## showLoading
+## scrollTo
 
-- **Parameter:** `undefined`
+- **Parameter:** `value|object`
 
 - **Detail:**
 
-  Show loading status.
+  - value
+    - Scroll to the number `value` position, the unit is `'px'`, set `'bottom'` means scroll to the bottom.
+  - object
+    -  Scroll to the unit (`px` or `rows (index starts by 0)`)
+    Default: `{unit: 'px', value: 0}`
 
-- **Example:** [Show/Hide Loading](https://examples.bootstrap-table.com/#methods/show-hide-loading.html)
+- **Example:** [Scroll To](https://examples.bootstrap-table.com/#methods/scorll-to.html)
 
-## hideLoading
+## selectPage
 
-- **Parameter:** `undefined`
+- **Parameter:** `page`
 
 - **Detail:**
 
-  Hide loading status.
+  Go to the a specified `page`.
 
-- **Example:** [Show/Hide Loading](https://examples.bootstrap-table.com/#methods/show-hide-loading.html)
+- **Example:** [Select/Prev/Next Page](https://examples.bootstrap-table.com/#methods/select-prev-next-page.html)
 
-## togglePagination
+## showAllColumns
 
 - **Parameter:** `undefined`
 
 - **Detail:**
 
-  Toggle the pagination option.
+  Show All the columns.
 
-- **Example:** [Toggle Pagination](https://examples.bootstrap-table.com/#methods/toggle-pagination.html)
+- **Example:** [Show/Hide All Columns](https://examples.bootstrap-table.com/#methods/show-hide-all-columns.html)
 
-## toggleFullscreen
+## showColumn
 
-- **Parameter:** `undefined`
+- **Parameter:** `field`
 
 - **Detail:**
 
-  Toggle fullscreen.
+  Show the specified `field` column.
+  The parameter can be a string or a array of fields.
 
-- **Example:** [Toggle Fullscreen](https://examples.bootstrap-table.com/#methods/toggle-fullscreen.html)
+- **Example:** [Show/Hide Column](https://examples.bootstrap-table.com/#methods/show-hide-column.html)
 
-## toggleView
+## showLoading
 
 - **Parameter:** `undefined`
 
 - **Detail:**
 
-  Toggle the card/table view.
+  Show loading status.
 
-- **Example:** [Toggle View](https://examples.bootstrap-table.com/#methods/toggle-view.html)
+- **Example:** [Show/Hide Loading](https://examples.bootstrap-table.com/#methods/show-hide-loading.html)
 
-## resetSearch
+## showRow
 
-- **Parameter:** `text`
+- **Parameter:** `params`
 
 - **Detail:**
 
-  Set the search `text`.
-
-- **Example:** [Reset Search](https://examples.bootstrap-table.com/#methods/reset-search.html)
+  Show the specified row. The params must contain at least one of the following properties:
 
-## filterBy
+  * `index`: the row index.
+  * `uniqueId`: the value of the uniqueId for that row.
 
-- **Parameter:**
-    - `filter - An Object of filter`
-    Default: `{}`
-    - `options - An Object of options`
-    Default:
-        ```
-        {
-            'filterAlgorithm': 'and'
-        }
-        ```
+- **Example:** [Show/Hide Row](https://examples.bootstrap-table.com/#methods/show-hide-row.html)
 
-- **Detail:**
+## toggleDetailView
 
-  (Can use only in client-side) Filter data in table.
-  There are multiple ways to filter:
-  - Leave the options blank to use the `and` filter.
-  - Set the `filterAlgorithm` (see at parameter) to `or` to use the `or` filter.
-  - Pass a function to the `filterAlgorithm` (see at parameter) to use a `custom` filter.
+- **Parameter:** `index`
 
-  **Filter Algorithm**
+- **Detail:**
 
-  - And
-    - Filter `{age: 10}` to show the data only age is equal to 10.  You can also filter with an array of values, as in: `{age: 10, hairColor: ['blue', 'red', 'green']}` to find data where age is equal to 10 and hairColor is either blue, red, or green.
-  - Or
-    - Filter `{age: 10, name: "santa"}` to show all Data which has a age of 10 **or** the name is equals to santa.
-  - Custom
-    - Filter by your Custom algorithm
-    - Function parameters:
-        - Row
-        - Filters
-    - Return `true` to keep the row and return `false` to filter the row.
+  Toggle the row that has the `index` passed by parameter if the detail view option is set to `true`.
 
-- **Example:** [Filter By](https://examples.bootstrap-table.com/#methods/filter-by.html)
+- **Example:** [Toggle Detail View](https://examples.bootstrap-table.com/#methods/toggle-detail-view.html)
 
-## scrollTo
+## toggleFullscreen
 
-- **Parameter:** `value|object`
+- **Parameter:** `undefined`
 
 - **Detail:**
 
-  - value
-    - Scroll to the number `value` position, the unit is `'px'`, set `'bottom'` means scroll to the bottom.
-  - object
-    -  Scroll to the unit (`px` or `rows (index starts by 0)`)
-    Default: `{unit: 'px', value: 0}`
+  Toggle fullscreen.
 
-- **Example:** [Scroll To](https://examples.bootstrap-table.com/#methods/scorll-to.html)
+- **Example:** [Toggle Fullscreen](https://examples.bootstrap-table.com/#methods/toggle-fullscreen.html)
 
-## getScrollPosition
+## togglePagination
 
 - **Parameter:** `undefined`
 
 - **Detail:**
 
-  Get the current scroll position, the unit is `'px'`.
+  Toggle the pagination option.
 
-- **Example:** [Get Scroll Position](https://examples.bootstrap-table.com/#methods/get-scroll-position.html)
+- **Example:** [Toggle Pagination](https://examples.bootstrap-table.com/#methods/toggle-pagination.html)
 
-## selectPage
+## toggleView
 
-- **Parameter:** `page`
+- **Parameter:** `undefined`
 
 - **Detail:**
 
-  Go to the a specified `page`.
+  Toggle the card/table view.
 
-- **Example:** [Select/Prev/Next Page](https://examples.bootstrap-table.com/#methods/select-prev-next-page.html)
+- **Example:** [Toggle View](https://examples.bootstrap-table.com/#methods/toggle-view.html)
 
-## prevPage
+## uncheck
 
-- **Parameter:** `undefined`
+- **Parameter:** `index`
 
 - **Detail:**
 
-  Go to previous page.
+  Uncheck a row, the row `index` start with 0.
 
-- **Example:** [Select/Prev/Next Page](https://examples.bootstrap-table.com/#methods/select-prev-next-page.html)
+- **Example:** [Check/Uncheck](https://examples.bootstrap-table.com/#methods/check-uncheck.html)
 
-## nextPage
+## uncheckAll
 
 - **Parameter:** `undefined`
 
 - **Detail:**
 
-  Go to next page.
+  Uncheck all current page rows.
 
-- **Example:** [Select/Prev/Next Page](https://examples.bootstrap-table.com/#methods/select-prev-next-page.html)
+- **Example:** [Check/Uncheck All](https://examples.bootstrap-table.com/#methods/check-uncheck-all.html)
 
-## toggleDetailView
+## uncheckBy
 
-- **Parameter:** `index`
+- **Parameter:** `params`
 
 - **Detail:**
 
-  Toggle the row that has the `index` passed by parameter if the detail view option is set to `true`.
-
-- **Example:** [Toggle Detail View](https://examples.bootstrap-table.com/#methods/toggle-detail-view.html)
+  Uncheck a row by array of values, the params contain:
 
-## expandRow
+  * `field`: name of the field used to find records.
+  * `values`: array of values for rows to uncheck.
 
-- **Parameter:** `index`
+- **Example:** [Check/Uncheck By](https://examples.bootstrap-table.com/#methods/check-uncheck-by.html)
 
-- **Detail:**
+## updateByUniqueId
 
-  Expand the row that has the `index` passed by parameter if the detail view option is set to `true`.
+- **Parameter:** `params`
 
-- **Example:** [Expand/Collapse Row](https://examples.bootstrap-table.com/#methods/expand-collapse-row.html)
+- **Detail:**
 
-## collapseRow
+  Update the specified row(s), each params contain following properties:
 
-- **Parameter:** `index`
+  * `id`: a row id where the id should be the uniqueid field assigned to the table.
+  * `row`: the new row data.
+  * `replace` (optional): set to `true` to replace the row instead of extending.
 
-- **Detail:**
+- **Example:** [Update By Unique Id](https://examples.bootstrap-table.com/#methods/update-by-unique-id.html)
 
-  Collapse the row that has the `index` passed by parameter if the detail view option is set to `true`.
+## updateCell
 
-- **Example:** [Expand/Collapse Row](https://examples.bootstrap-table.com/#methods/expand-collapse-row.html)
+- **Parameter:** `params`
 
-## expandAllRows
+- **Detail:**
 
-- **Parameter:** `undefined`
+  Update one cell, the params contain following properties:
 
-- **Detail:**
+  * `index`: the row index.
+  * `field`: the field name.
+  * `value`: the new field value.
 
-  Expand all rows if the detail view option is set to `true`.
+  To disable table re-initialization you can set `{reinit: false}`.
 
-- **Example:** [Expand/Collapse All Rows](https://examples.bootstrap-table.com/#methods/expand-collapse-all-rows.html)
+- **Example:** [Update Cell](https://examples.bootstrap-table.com/#methods/update-cell.html)
 
-## collapseAllRows
+## updateCellByUniqueId
 
-- **Parameter:** `undefined`
+- **Parameter:** `params`
 
 - **Detail:**
 
-  Collapse all rows if the detail view option is set to `true`.
+  Update the cell specified by the id, each params contain following properties:
 
-- **Example:** [Expand/Collapse All Rows](https://examples.bootstrap-table.com/#methods/expand-collapse-all-rows.html)
+  * `id`: row id where the id should be the `uniqueId` field assigned to the table.
+  * `field`: field name of the cell to be updated.
+  * `value`: new value of the cell.
+
+- **Example:** [Update Cell By Unique Id](https://examples.bootstrap-table.com/#methods/update-cell-by-unique-id.html)
 
 ## updateColumnTitle
 
@@ -649,3 +635,17 @@ The calling method syntax: `$('#table').bootstrapTable('method', parameter)`.
   Update the localizations format text.
 
 - **Example:** [Update Format Text](https://examples.bootstrap-table.com/#methods/update-format-text.html)
+## updateRow
+
+- **Parameter:** `params`
+
+- **Detail:**
+
+  Update the specified row(s), each params contain following properties:
+
+  * `index`: the row index to be updated.
+  * `row`: the new row data.
+  * `replace` (optional): set to `true` to replace the row instead of extending.
+
+- **Example:** [Update Row](https://examples.bootstrap-table.com/#methods/update-row.html)
+

文件差异内容过多而无法显示
+ 657 - 657
site/docs/api/table-options.md


+ 5 - 0
tools/check-api.js

@@ -8,9 +8,14 @@ let errorSum = 0
 class API {
   constructor () {
     this.init()
+    this.sortOptions()
     this.check()
   }
 
+  sortOptions () {
+    this.options.sort()
+  }
+
   check () {
     const file = `../site/docs/api/${this.file}`
     const md = {}