Browse Source

Added methods examples

zhixin 6 years ago
parent
commit
6e5d282882
4 changed files with 123 additions and 6 deletions
  1. 1 1
      site/docs/api/column-options.md
  2. 115 3
      site/docs/api/methods.md
  3. 3 1
      src/bootstrap-table.js
  4. 4 1
      tools/check-api.js

+ 1 - 1
site/docs/api/column-options.md

@@ -243,7 +243,7 @@ The column options is defined in `jQuery.fn.bootstrapTable.columnDefaults`.
 
 
 - **Default:** `true`
 - **Default:** `true`
 
 
-- **Example:** [Checkbox Enabled](https://examples.bootstrap-table.com/#column-options/checkbox-enabled.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)
 
 
 ## clickToSelect
 ## clickToSelect
 
 

+ 115 - 3
site/docs/api/methods.md

@@ -16,6 +16,8 @@ The calling method syntax: `$('#table').bootstrapTable('method', parameter)`.
 
 
   Return the options object.
   Return the options object.
 
 
+- **Example:** [Get Options](https://examples.bootstrap-table.com/#methods/get-options.html)
+
 ## refreshOptions
 ## refreshOptions
 
 
 - **Parameter:** `options`
 - **Parameter:** `options`
@@ -24,6 +26,8 @@ The calling method syntax: `$('#table').bootstrapTable('method', parameter)`.
 
 
   Refresh the table `options`.
   Refresh the table `options`.
 
 
+- **Example:** [Refresh Options](https://examples.bootstrap-table.com/#methods/refresh-options.html)
+
 ## getData
 ## getData
 
 
 - **Parameter:** `useCurrentPage`
 - **Parameter:** `useCurrentPage`
@@ -32,6 +36,8 @@ The calling method syntax: `$('#table').bootstrapTable('method', parameter)`.
 
 
   Get the loaded data of table at the moment that this method is called. If you set the `useCurrentPage` to `true` the method will return the data in the current page.
   Get the loaded data of table at the moment that this method is called. If you set the `useCurrentPage` to `true` the method will return the data in the current page.
 
 
+- **Example:** [Get Data](https://examples.bootstrap-table.com/#methods/get-data.html)
+
 ## getSelections
 ## getSelections
 
 
 - **Parameter:** `undefined`
 - **Parameter:** `undefined`
@@ -40,6 +46,8 @@ The calling method syntax: `$('#table').bootstrapTable('method', parameter)`.
 
 
   Return selected rows, when no record selected, an empty array will return.
   Return selected rows, when no record selected, an empty array will return.
 
 
+- **Example:** [Get Selections](https://examples.bootstrap-table.com/#methods/get-selections.html)
+
 ## getAllSelections
 ## getAllSelections
 
 
 - **Parameter:** `undefined`
 - **Parameter:** `undefined`
@@ -48,6 +56,8 @@ The calling method syntax: `$('#table').bootstrapTable('method', parameter)`.
 
 
   Return all selected rows contain search or filter, when no record selected, an empty array will return.
   Return all selected rows contain search or filter, when no record selected, an empty array will return.
 
 
+- **Example:** [Get All Selections](https://examples.bootstrap-table.com/#methods/get-all-selections.html)
+
 ## load
 ## load
 
 
 - **Parameter:** `data`
 - **Parameter:** `data`
@@ -56,6 +66,8 @@ The calling method syntax: `$('#table').bootstrapTable('method', parameter)`.
 
 
   Load the `data` to table, the old rows will be removed.
   Load the `data` to table, the old rows will be removed.
 
 
+- **Example:** [Load](https://examples.bootstrap-table.com/#methods/load.html)
+
 ## append
 ## append
 
 
 - **Parameter:** `data`
 - **Parameter:** `data`
@@ -64,6 +76,8 @@ The calling method syntax: `$('#table').bootstrapTable('method', parameter)`.
 
 
   Append the `data` to table.
   Append the `data` to table.
 
 
+- **Example:** [Append](https://examples.bootstrap-table.com/#methods/append.html)
+
 ## prepend
 ## prepend
 
 
 - **Parameter:** `data`
 - **Parameter:** `data`
@@ -72,6 +86,8 @@ The calling method syntax: `$('#table').bootstrapTable('method', parameter)`.
 
 
   Prepend the `data` to table.
   Prepend the `data` to table.
 
 
+- **Example:** [Prepend](https://examples.bootstrap-table.com/#methods/prepend.html)
+
 ## remove
 ## remove
 
 
 - **Parameter:** `params`
 - **Parameter:** `params`
@@ -83,6 +99,8 @@ The calling method syntax: `$('#table').bootstrapTable('method', parameter)`.
   * `field`: the field name of remove rows.
   * `field`: the field name of remove rows.
   * `values`: the array of values for rows which should be removed.
   * `values`: the array of values for rows which should be removed.
 
 
+- **Example:** [Remove](https://examples.bootstrap-table.com/#methods/remove.html)
+
 ## removeAll
 ## removeAll
 
 
 - **Parameter:** `undefined`
 - **Parameter:** `undefined`
@@ -91,6 +109,8 @@ The calling method syntax: `$('#table').bootstrapTable('method', parameter)`.
 
 
   Remove all data from table.
   Remove all data from table.
 
 
+- **Example:** [Remove All](https://examples.bootstrap-table.com/#methods/remove-all.html)
+
 ## insertRow
 ## insertRow
 
 
 - **Parameter:** `params`
 - **Parameter:** `params`
@@ -102,6 +122,8 @@ The calling method syntax: `$('#table').bootstrapTable('method', parameter)`.
   * `index`: the row index to insert into.
   * `index`: the row index to insert into.
   * `row`: the row data.
   * `row`: the row data.
 
 
+- **Example:** [Insert Row](https://examples.bootstrap-table.com/#methods/insert-row.html)
+
 ## updateRow
 ## updateRow
 
 
 - **Parameter:** `params`
 - **Parameter:** `params`
@@ -113,6 +135,8 @@ The calling method syntax: `$('#table').bootstrapTable('method', parameter)`.
   * `index`: the row index to be updated.
   * `index`: the row index to be updated.
   * `row`: the new row data.
   * `row`: the new row data.
 
 
+- **Example:** [Update Row](https://examples.bootstrap-table.com/#methods/update-row.html)
+
 ## getRowByUniqueId
 ## getRowByUniqueId
 
 
 - **Parameter:** `id`
 - **Parameter:** `id`
@@ -121,6 +145,8 @@ The calling method syntax: `$('#table').bootstrapTable('method', parameter)`.
 
 
   Get data from table, the row that contains the `id` passed by parameter.
   Get data from table, the row that contains the `id` passed by parameter.
 
 
+- **Example:** [Get Row By Unique Id](https://examples.bootstrap-table.com/#methods/get-row-by-unique-id.html)
+
 ## updateByUniqueId
 ## updateByUniqueId
 
 
 - **Parameter:** `params`
 - **Parameter:** `params`
@@ -132,6 +158,8 @@ The calling method syntax: `$('#table').bootstrapTable('method', parameter)`.
   * `id`: a row id where the id should be the uniqueid field assigned to the table.
   * `id`: a row id where the id should be the uniqueid field assigned to the table.
   * `row`: the new row data.
   * `row`: the new row data.
 
 
+- **Example:** [Update By Unique Id](https://examples.bootstrap-table.com/#methods/update-by-unique-id.html)
+
 ## removeByUniqueId
 ## removeByUniqueId
 
 
 - **Parameter:** `id`
 - **Parameter:** `id`
@@ -140,6 +168,8 @@ The calling method syntax: `$('#table').bootstrapTable('method', parameter)`.
 
 
   Remove data from table, the row that contains the `id` passed by parameter.
   Remove data from table, the row that contains the `id` passed by parameter.
 
 
+- **Example:** [Remove By Unique Id](https://examples.bootstrap-table.com/#methods/remove-by-unique-id.html)
+
 ## updateCell
 ## updateCell
 
 
 - **Parameter:** `params`
 - **Parameter:** `params`
@@ -154,6 +184,8 @@ The calling method syntax: `$('#table').bootstrapTable('method', parameter)`.
 
 
   To disable table re-initialization you can set `{reinit: false}`.
   To disable table re-initialization you can set `{reinit: false}`.
 
 
+- **Example:** [Update Cell](https://examples.bootstrap-table.com/#methods/update-cell.html)
+
 ## updateCellByUniqueId
 ## updateCellByUniqueId
 
 
 - **Parameter:** `params`
 - **Parameter:** `params`
@@ -166,6 +198,8 @@ The calling method syntax: `$('#table').bootstrapTable('method', parameter)`.
   * `field`: field name of the cell to be updated.
   * `field`: field name of the cell to be updated.
   * `value`: new value of the cell.
   * `value`: new value of the cell.
 
 
+- **Example:** [Update Cell By Unique Id](https://examples.bootstrap-table.com/#methods/update-cell-by-unique-id.html)
+
 ## showRow
 ## showRow
 
 
 - **Parameter:** `params`
 - **Parameter:** `params`
@@ -177,6 +211,8 @@ The calling method syntax: `$('#table').bootstrapTable('method', parameter)`.
   * `index`: the row index.
   * `index`: the row index.
   * `uniqueId`: the value of the uniqueId for that row.
   * `uniqueId`: the value of the uniqueId for that row.
 
 
+- **Example:** [Show/Hide Row](https://examples.bootstrap-table.com/#methods/show-hide-row.html)
+
 ## hideRow
 ## hideRow
 
 
 - **Parameter:** `params`
 - **Parameter:** `params`
@@ -188,6 +224,8 @@ The calling method syntax: `$('#table').bootstrapTable('method', parameter)`.
   * `index`: the row index.
   * `index`: the row index.
   * `uniqueId`: the value of the uniqueId for that row.
   * `uniqueId`: the value of the uniqueId for that row.
 
 
+- **Example:** [Show/Hide Row](https://examples.bootstrap-table.com/#methods/show-hide-row.html)
+
 ## getHiddenRows
 ## getHiddenRows
 
 
 - **Parameter:** `show`
 - **Parameter:** `show`
@@ -196,6 +234,8 @@ The calling method syntax: `$('#table').bootstrapTable('method', 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.
   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:** [Get Hidden Rows](https://examples.bootstrap-table.com/#methods/get-hidden-rows.html)
+
 ## showColumn
 ## showColumn
 
 
 - **Parameter:** `field`
 - **Parameter:** `field`
@@ -205,6 +245,8 @@ The calling method syntax: `$('#table').bootstrapTable('method', parameter)`.
   Show the specified `field` column.
   Show the specified `field` column.
   The parameter can be a string or a array of fields.
   The parameter can be a string or a array of fields.
 
 
+- **Example:** [Show/Hide Column](https://examples.bootstrap-table.com/#methods/show-hide-column.html)
+
 ## hideColumn
 ## hideColumn
 
 
 - **Parameter:** `field`
 - **Parameter:** `field`
@@ -214,6 +256,8 @@ The calling method syntax: `$('#table').bootstrapTable('method', parameter)`.
   Hide the specified `field` column.
   Hide the specified `field` column.
   The parameter can be a string or a array of fields.
   The parameter can be a string or a array of fields.
 
 
+- **Example:** [Show/Hide Column](https://examples.bootstrap-table.com/#methods/show-hide-column.html)
+
 ## getVisibleColumns
 ## getVisibleColumns
 
 
 - **Parameter:** `-`
 - **Parameter:** `-`
@@ -222,6 +266,8 @@ The calling method syntax: `$('#table').bootstrapTable('method', parameter)`.
 
 
   Get visible columns.
   Get visible columns.
 
 
+- **Example:** [Get Visible/Hidden Columns](https://examples.bootstrap-table.com/#methods/get-visible-hidden-columns.html)
+
 ## getHiddenColumns
 ## getHiddenColumns
 
 
 - **Parameter:** `undefined`
 - **Parameter:** `undefined`
@@ -230,6 +276,8 @@ The calling method syntax: `$('#table').bootstrapTable('method', parameter)`.
 
 
   Get hidden columns.
   Get hidden columns.
 
 
+- **Example:** [Get Visible/Hidden Columns](https://examples.bootstrap-table.com/#methods/get-visible-hidden-columns.html)
+
 ## showAllColumns
 ## showAllColumns
 
 
 - **Parameter:** `undefined`
 - **Parameter:** `undefined`
@@ -238,6 +286,8 @@ The calling method syntax: `$('#table').bootstrapTable('method', parameter)`.
 
 
   Show All the columns.
   Show All the columns.
 
 
+- **Example:** [Show/Hide All Columns](https://examples.bootstrap-table.com/#methods/show-hide-all-columns.html)
+
 ## hideAllColumns
 ## hideAllColumns
 
 
 - **Parameter:** `undefined`
 - **Parameter:** `undefined`
@@ -246,6 +296,8 @@ The calling method syntax: `$('#table').bootstrapTable('method', parameter)`.
 
 
   Hide All the columns.
   Hide All the columns.
 
 
+- **Example:** [Show/Hide All Columns](https://examples.bootstrap-table.com/#methods/show-hide-all-columns.html)
+
 ## mergeCells
 ## mergeCells
 
 
 - **Parameter:** `params`
 - **Parameter:** `params`
@@ -259,6 +311,8 @@ The calling method syntax: `$('#table').bootstrapTable('method', parameter)`.
   * `rowspan`: the rowspan count to be merged.
   * `rowspan`: the rowspan count to be merged.
   * `colspan`: the colspan count to be merged.
   * `colspan`: the colspan count to be merged.
 
 
+- **Example:** [Merge Cells](https://examples.bootstrap-table.com/#methods/merge-cells.html)
+
 ## checkAll
 ## checkAll
 
 
 - **Parameter:** `undefined`
 - **Parameter:** `undefined`
@@ -267,6 +321,8 @@ The calling method syntax: `$('#table').bootstrapTable('method', parameter)`.
 
 
   Check all current page rows.
   Check all current page rows.
 
 
+- **Example:** [Check/Uncheck All](https://examples.bootstrap-table.com/#methods/check-uncheck-all.html)
+
 ## uncheckAll
 ## uncheckAll
 
 
 - **Parameter:** `undefined`
 - **Parameter:** `undefined`
@@ -275,6 +331,8 @@ The calling method syntax: `$('#table').bootstrapTable('method', parameter)`.
 
 
   Uncheck all current page rows.
   Uncheck all current page rows.
 
 
+- **Example:** [Check/Uncheck All](https://examples.bootstrap-table.com/#methods/check-uncheck-all.html)
+
 ## checkInvert
 ## checkInvert
 
 
 - **Parameter:** `undefined`
 - **Parameter:** `undefined`
@@ -283,6 +341,8 @@ The calling method syntax: `$('#table').bootstrapTable('method', parameter)`.
 
 
   Invert check of current page rows. Triggers `onCheckSome` and `onUncheckSome` events.
   Invert check of current page rows. Triggers `onCheckSome` and `onUncheckSome` events.
 
 
+- **Example:** [Check Invert](https://examples.bootstrap-table.com/#methods/check-invert.html)
+
 ## check
 ## check
 
 
 - **Parameter:** `index`
 - **Parameter:** `index`
@@ -291,6 +351,8 @@ The calling method syntax: `$('#table').bootstrapTable('method', parameter)`.
 
 
   Check a row, the row `index` start with 0.
   Check a row, the row `index` start with 0.
 
 
+- **Example:** [Check/Uncheck](https://examples.bootstrap-table.com/#methods/check-uncheck.html)
+
 ## uncheck
 ## uncheck
 
 
 - **Parameter:** `index`
 - **Parameter:** `index`
@@ -299,6 +361,8 @@ The calling method syntax: `$('#table').bootstrapTable('method', parameter)`.
 
 
   Uncheck a row, the row `index` start with 0.
   Uncheck a row, the row `index` start with 0.
 
 
+- **Example:** [Check/Uncheck](https://examples.bootstrap-table.com/#methods/check-uncheck.html)
+
 ## checkBy
 ## checkBy
 
 
 - **Parameter:** `params`
 - **Parameter:** `params`
@@ -310,6 +374,8 @@ The calling method syntax: `$('#table').bootstrapTable('method', parameter)`.
   * `field`: name of the field used to find records.
   * `field`: name of the field used to find records.
   * `values`: array of values for rows to check.
   * `values`: array of values for rows to check.
 
 
+- **Example:** [Check/Uncheck By](https://examples.bootstrap-table.com/#methods/check-uncheck-by.html)
+
 ## uncheckBy
 ## uncheckBy
 
 
 - **Parameter:** `params`
 - **Parameter:** `params`
@@ -321,13 +387,17 @@ The calling method syntax: `$('#table').bootstrapTable('method', parameter)`.
   * `field`: name of the field used to find records.
   * `field`: name of the field used to find records.
   * `values`: array of values for rows to uncheck.
   * `values`: array of values for rows to uncheck.
 
 
+- **Example:** [Check/Uncheck By](https://examples.bootstrap-table.com/#methods/check-uncheck-by.html)
+
 ## refresh
 ## refresh
 
 
 - **Parameter:** `params`
 - **Parameter:** `params`
 
 
 - **Detail:**
 - **Detail:**
 
 
-  Refresh 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'}}`.
+  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:** [Refresh](https://examples.bootstrap-table.com/#methods/refresh.html)
 
 
 ## destroy
 ## destroy
 
 
@@ -337,6 +407,8 @@ The calling method syntax: `$('#table').bootstrapTable('method', parameter)`.
 
 
   Destroy the Bootstrap Table.
   Destroy the Bootstrap Table.
 
 
+- **Example:** [Destroy](https://examples.bootstrap-table.com/#methods/destroy.html)
+
 ## resetView
 ## resetView
 
 
 - **Parameter:** `params`
 - **Parameter:** `params`
@@ -347,6 +419,8 @@ The calling method syntax: `$('#table').bootstrapTable('method', parameter)`.
 
 
   * `height`: the height of the table.
   * `height`: the height of the table.
 
 
+- **Example:** [Reset View](https://examples.bootstrap-table.com/#methods/reset-view.html)
+
 ## resetWidth
 ## resetWidth
 
 
 - **Parameter:** `undefined`
 - **Parameter:** `undefined`
@@ -363,6 +437,8 @@ The calling method syntax: `$('#table').bootstrapTable('method', parameter)`.
 
 
   Show loading status.
   Show loading status.
 
 
+- **Example:** [Show/Hide Loading](https://examples.bootstrap-table.com/#methods/show-hide-loading.html)
+
 ## hideLoading
 ## hideLoading
 
 
 - **Parameter:** `undefined`
 - **Parameter:** `undefined`
@@ -371,6 +447,8 @@ The calling method syntax: `$('#table').bootstrapTable('method', parameter)`.
 
 
   Hide loading status.
   Hide loading status.
 
 
+- **Example:** [Show/Hide Loading](https://examples.bootstrap-table.com/#methods/show-hide-loading.html)
+
 ## togglePagination
 ## togglePagination
 
 
 - **Parameter:** `undefined`
 - **Parameter:** `undefined`
@@ -379,6 +457,8 @@ The calling method syntax: `$('#table').bootstrapTable('method', parameter)`.
 
 
   Toggle the pagination option.
   Toggle the pagination option.
 
 
+- **Example:** [Toggle Pagination](https://examples.bootstrap-table.com/#methods/toggle-pagination.html)
+
 ## toggleFullscreen
 ## toggleFullscreen
 
 
 - **Parameter:** `undefined`
 - **Parameter:** `undefined`
@@ -387,6 +467,8 @@ The calling method syntax: `$('#table').bootstrapTable('method', parameter)`.
 
 
   Toggle fullscreen.
   Toggle fullscreen.
 
 
+- **Example:** [Toggle Fullscreen](https://examples.bootstrap-table.com/#methods/toggle-fullscreen.html)
+
 ## toggleView
 ## toggleView
 
 
 - **Parameter:** `undefined`
 - **Parameter:** `undefined`
@@ -395,6 +477,8 @@ The calling method syntax: `$('#table').bootstrapTable('method', parameter)`.
 
 
   Toggle the card/table view.
   Toggle the card/table view.
 
 
+- **Example:** [Toggle View](https://examples.bootstrap-table.com/#methods/toggle-view.html)
+
 ## resetSearch
 ## resetSearch
 
 
 - **Parameter:** `text`
 - **Parameter:** `text`
@@ -403,6 +487,8 @@ The calling method syntax: `$('#table').bootstrapTable('method', parameter)`.
 
 
   Set the search `text`.
   Set the search `text`.
 
 
+- **Example:** [Reset Search](https://examples.bootstrap-table.com/#methods/reset-search.html)
+
 ## filterBy
 ## filterBy
 
 
 - **Parameter:**
 - **Parameter:**
@@ -424,7 +510,7 @@ The calling method syntax: `$('#table').bootstrapTable('method', parameter)`.
   - Set the `filterAlgorithm` (see at parameter) to `or` to use the `or` 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.
   - Pass a function to the `filterAlgorithm` (see at parameter) to use a `custom` filter.
 
 
-  #####Filter Algorithm
+  **Filter Algorithm**
 
 
   - And
   - 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.
     - 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.
@@ -437,6 +523,8 @@ The calling method syntax: `$('#table').bootstrapTable('method', parameter)`.
         - Filters
         - Filters
     - Return `true` to keep the row and return `false` to filter the row.
     - Return `true` to keep the row and return `false` to filter the row.
 
 
+- **Example:** [Filter By](https://examples.bootstrap-table.com/#methods/filter-by.html)
+
 ## scrollTo
 ## scrollTo
 
 
 - **Parameter:** `value|object`
 - **Parameter:** `value|object`
@@ -449,6 +537,8 @@ The calling method syntax: `$('#table').bootstrapTable('method', parameter)`.
     -  Scroll to the unit (`px` or `rows (index starts by 0)`)
     -  Scroll to the unit (`px` or `rows (index starts by 0)`)
     Default: `{unit: 'px', value: 0}`
     Default: `{unit: 'px', value: 0}`
 
 
+- **Example:** [Scroll To](https://examples.bootstrap-table.com/#methods/scorll-to.html)
+
 ## getScrollPosition
 ## getScrollPosition
 
 
 - **Parameter:** `undefined`
 - **Parameter:** `undefined`
@@ -457,6 +547,8 @@ The calling method syntax: `$('#table').bootstrapTable('method', parameter)`.
 
 
   Get the current scroll position, the unit is `'px'`.
   Get the current scroll position, the unit is `'px'`.
 
 
+- **Example:** [Get Scroll Position](https://examples.bootstrap-table.com/#methods/get-scroll-position.html)
+
 ## selectPage
 ## selectPage
 
 
 - **Parameter:** `page`
 - **Parameter:** `page`
@@ -465,6 +557,8 @@ The calling method syntax: `$('#table').bootstrapTable('method', parameter)`.
 
 
   Go to the a specified `page`.
   Go to the a specified `page`.
 
 
+- **Example:** [Select/Prev/Next Page](https://examples.bootstrap-table.com/#methods/select-prev-next-page.html.html)
+
 ## prevPage
 ## prevPage
 
 
 - **Parameter:** `undefined`
 - **Parameter:** `undefined`
@@ -473,6 +567,8 @@ The calling method syntax: `$('#table').bootstrapTable('method', parameter)`.
 
 
   Go to previous page.
   Go to previous page.
 
 
+- **Example:** [Select/Prev/Next Page](https://examples.bootstrap-table.com/#methods/select-prev-next-page.html.html)
+
 ## nextPage
 ## nextPage
 
 
 - **Parameter:** `undefined`
 - **Parameter:** `undefined`
@@ -481,6 +577,8 @@ The calling method syntax: `$('#table').bootstrapTable('method', parameter)`.
 
 
   Go to next page.
   Go to next page.
 
 
+- **Example:** [Select/Prev/Next Page](https://examples.bootstrap-table.com/#methods/select-prev-next-page.html)
+
 ## toggleDetailView
 ## toggleDetailView
 
 
 - **Parameter:** `index`
 - **Parameter:** `index`
@@ -489,6 +587,8 @@ The calling method syntax: `$('#table').bootstrapTable('method', parameter)`.
 
 
   Toggle the row that has the `index` passed by parameter if the detail view option is set to `true`.
   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)
+
 ## expandRow
 ## expandRow
 
 
 - **Parameter:** `index`
 - **Parameter:** `index`
@@ -497,6 +597,8 @@ The calling method syntax: `$('#table').bootstrapTable('method', parameter)`.
 
 
   Expand the row that has the `index` passed by parameter if the detail view option is set to `true`.
   Expand the row that has the `index` passed by parameter if the detail view option is set to `true`.
 
 
+- **Example:** [Expand/Collapse Row](https://examples.bootstrap-table.com/#methods/expand-collapse-row.html)
+
 ## collapseRow
 ## collapseRow
 
 
 - **Parameter:** `index`
 - **Parameter:** `index`
@@ -505,6 +607,8 @@ The calling method syntax: `$('#table').bootstrapTable('method', parameter)`.
 
 
   Collapse the row that has the `index` passed by parameter if the detail view option is set to `true`.
   Collapse the row that has the `index` passed by parameter if the detail view option is set to `true`.
 
 
+- **Example:** [Expand/Collapse Row](https://examples.bootstrap-table.com/#methods/expand-collapse-row.html)
+
 ## expandAllRows
 ## expandAllRows
 
 
 - **Parameter:** `undefined`
 - **Parameter:** `undefined`
@@ -513,6 +617,8 @@ The calling method syntax: `$('#table').bootstrapTable('method', parameter)`.
 
 
   Expand all rows if the detail view option is set to `true`.
   Expand all rows if the detail view option is set to `true`.
 
 
+- **Example:** [Expand/Collapse All Rows](https://examples.bootstrap-table.com/#methods/expand-collapse-all-rows.html)
+
 ## collapseAllRows
 ## collapseAllRows
 
 
 - **Parameter:** `undefined`
 - **Parameter:** `undefined`
@@ -521,17 +627,21 @@ The calling method syntax: `$('#table').bootstrapTable('method', parameter)`.
 
 
   Collapse all rows if the detail view option is set to `true`.
   Collapse all rows if the detail view option is set to `true`.
 
 
+- **Example:** [Expand/Collapse All Rows](https://examples.bootstrap-table.com/#methods/expand-collapse-all-rows.html)
+
 ## updateColumnTitle
 ## updateColumnTitle
 
 
 - **Parameter:** `params`
 - **Parameter:** `params`
 
 
 - **Detail:**
 - **Detail:**
 
 
-  Refresh the field title of column, the params contain following properties:
+  Update the field title of column, the params contain following properties:
 
 
   * `field`: the field name.
   * `field`: the field name.
   * `title`: the field title.
   * `title`: the field title.
 
 
+- **Example:** [Update Column Title](https://examples.bootstrap-table.com/#methods/update-column-title.html)
+
 ## updateFormatText
 ## updateFormatText
 
 
 - **Parameter:** `formatName, text`
 - **Parameter:** `formatName, text`
@@ -539,3 +649,5 @@ The calling method syntax: `$('#table').bootstrapTable('method', parameter)`.
 - **Detail:**
 - **Detail:**
 
 
   Update the localizations format text.
   Update the localizations format text.
+
+- **Example:** [Update Format Text](https://examples.bootstrap-table.com/#methods/update-format-text.html)

+ 3 - 1
src/bootstrap-table.js

@@ -2240,7 +2240,9 @@ class BootstrapTable {
 
 
   _toggleAllColumns (visible) {
   _toggleAllColumns (visible) {
     for (const column of this.columns) {
     for (const column of this.columns) {
-      column.visible = visible
+      if (column.switchable) {
+        column.visible = visible
+      }
     }
     }
 
 
     this.initHeader()
     this.initHeader()

+ 4 - 1
tools/check-api.js

@@ -76,7 +76,10 @@ class Methods extends API {
   init () {
   init () {
     this.file = 'methods.md'
     this.file = 'methods.md'
     this.options = Constants.METHODS
     this.options = Constants.METHODS
-    this.attributes = ['Parameter', 'Detail']//, 'Example']
+    this.attributes = ['Parameter', 'Detail', 'Example']
+    this.ignore = {
+      resetWidth: ['Example']
+    }
   }
   }
 }
 }