|
|
@@ -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)
|
|
|
+
|